mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 03:15:30 +00:00
Delay joystick initialization until necessary
This commit is contained in:
parent
6d0427b928
commit
5958db383d
|
@ -206,8 +206,8 @@ namespace OpenTK
|
||||||
{
|
{
|
||||||
if (!OpenTK.Platform.SDL2.SDL.WasInit(0))
|
if (!OpenTK.Platform.SDL2.SDL.WasInit(0))
|
||||||
{
|
{
|
||||||
var flags = OpenTK.Platform.SDL2.SystemFlags.EVERYTHING;
|
var flags =
|
||||||
flags &= ~OpenTK.Platform.SDL2.SystemFlags.AUDIO;
|
OpenTK.Platform.SDL2.SystemFlags.VIDEO | Platform.SDL2.SystemFlags.TIMER;
|
||||||
if (OpenTK.Platform.SDL2.SDL.Init(flags) == 0)
|
if (OpenTK.Platform.SDL2.SDL.Init(flags) == 0)
|
||||||
{
|
{
|
||||||
supported = true;
|
supported = true;
|
||||||
|
|
|
@ -59,6 +59,7 @@ namespace OpenTK.Platform.SDL2
|
||||||
driver_handle = new IntPtr(count++);
|
driver_handle = new IntPtr(count++);
|
||||||
DriverHandles.Add(driver_handle, this);
|
DriverHandles.Add(driver_handle, this);
|
||||||
SDL.AddEventWatch(EventFilterDelegate, driver_handle);
|
SDL.AddEventWatch(EventFilterDelegate, driver_handle);
|
||||||
|
SDL.InitSubSystem(SystemFlags.JOYSTICK | SystemFlags.GAMECONTROLLER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue