[Win] Do not create second WinMMJoystick instance

This commit is contained in:
Stefanos A. 2014-02-01 16:03:07 +01:00
parent 45df508f8f
commit d0522f1073

View file

@ -84,7 +84,7 @@ namespace OpenTK.Platform.Windows
const ClassStyle DefaultClassStyle = ClassStyle.OwnDC;
// Used for IInputDriver implementation
WinMMJoystick joystick_driver = new WinMMJoystick();
IJoystickDriver joystick_driver = Factory.Default.CreateLegacyJoystickDriver();
KeyboardDevice keyboard = new KeyboardDevice();
MouseDevice mouse = new MouseDevice();
IList<KeyboardDevice> keyboards = new List<KeyboardDevice>(1);
@ -1403,7 +1403,8 @@ namespace OpenTK.Platform.Windows
public void Poll()
{
joystick_driver.Poll();
if (joystick_driver is WinMMJoystick)
(joystick_driver as WinMMJoystick).Poll();
}
#endregion