From b06169b457047c560426b95ae5621a4405c5875b Mon Sep 17 00:00:00 2001 From: Tzach Shabtay Date: Sun, 11 Dec 2016 18:03:29 -0500 Subject: [PATCH 1/2] Removed the stubs for System.Diagnostics.Debug from Android & IOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This looks like it was once a Xamarin limitation, but it’s not anymore. Note: tested this on Android, but not on IOS (tested compilation on IOS only). Fixes #447 --- src/OpenTK/Minimal.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenTK/Minimal.cs b/src/OpenTK/Minimal.cs index 11b62b76..56ddd440 100644 --- a/src/OpenTK/Minimal.cs +++ b/src/OpenTK/Minimal.cs @@ -13,6 +13,8 @@ namespace OpenTK // minimal targets (e.g. MonoTouch). // Note: the "overriden" classes must not be fully qualified for this to work! + #if MINIMAL + // System.Diagnostics.Debug static class Debug { @@ -39,8 +41,6 @@ namespace OpenTK public static void Flush() { } } - #if MINIMAL - // System.Diagnostics.Stopwatch sealed class Stopwatch { From 114f02ff4952c0a0b92180ec1259101be412a3d6 Mon Sep 17 00:00:00 2001 From: Christopher Lees Date: Fri, 27 Jan 2017 15:48:32 +0000 Subject: [PATCH 2/2] Fix: Some joysticks return an invalid HID page of 1 --- src/OpenTK/Platform/Windows/WinRawJoystick.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/OpenTK/Platform/Windows/WinRawJoystick.cs b/src/OpenTK/Platform/Windows/WinRawJoystick.cs index 82f13c60..ccc82425 100644 --- a/src/OpenTK/Platform/Windows/WinRawJoystick.cs +++ b/src/OpenTK/Platform/Windows/WinRawJoystick.cs @@ -83,8 +83,13 @@ namespace OpenTK.Platform.Windows { if (page == HIDPage.GenericDesktop || page == HIDPage.Simulation) // set axis only when HIDPage is known by HidHelper.TranslateJoystickAxis() to avoid axis0 to be overwritten by unknown HIDPage { - JoystickAxis axis = GetAxis(collection, page, usage); - State.SetAxis(axis, value); + //Certain joysticks (Speedlink Black Widow, PS3 pad connected via USB) + //return an invalid HID page of 1, so + if ((int)usage != 1) + { + JoystickAxis axis = GetAxis(collection, page, usage); + State.SetAxis(axis, value); + } } }