From d0522f1073823d9805b12688af1795920ff14803 Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Sat, 1 Feb 2014 16:03:07 +0100 Subject: [PATCH] [Win] Do not create second WinMMJoystick instance --- Source/OpenTK/Platform/Windows/WinGLNative.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index 999aa85c..79b37605 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -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 keyboards = new List(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