mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-10 19:25:39 +00:00
[Win] Do not create second WinMMJoystick instance
This commit is contained in:
parent
45df508f8f
commit
d0522f1073
|
@ -84,7 +84,7 @@ namespace OpenTK.Platform.Windows
|
||||||
const ClassStyle DefaultClassStyle = ClassStyle.OwnDC;
|
const ClassStyle DefaultClassStyle = ClassStyle.OwnDC;
|
||||||
|
|
||||||
// Used for IInputDriver implementation
|
// Used for IInputDriver implementation
|
||||||
WinMMJoystick joystick_driver = new WinMMJoystick();
|
IJoystickDriver joystick_driver = Factory.Default.CreateLegacyJoystickDriver();
|
||||||
KeyboardDevice keyboard = new KeyboardDevice();
|
KeyboardDevice keyboard = new KeyboardDevice();
|
||||||
MouseDevice mouse = new MouseDevice();
|
MouseDevice mouse = new MouseDevice();
|
||||||
IList<KeyboardDevice> keyboards = new List<KeyboardDevice>(1);
|
IList<KeyboardDevice> keyboards = new List<KeyboardDevice>(1);
|
||||||
|
@ -1403,7 +1403,8 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
public void Poll()
|
public void Poll()
|
||||||
{
|
{
|
||||||
joystick_driver.Poll();
|
if (joystick_driver is WinMMJoystick)
|
||||||
|
(joystick_driver as WinMMJoystick).Poll();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue