diff --git a/Source/OpenTK/Platform/Utilities.cs b/Source/OpenTK/Platform/Utilities.cs index 1d6801c6..54b3a633 100644 --- a/Source/OpenTK/Platform/Utilities.cs +++ b/Source/OpenTK/Platform/Utilities.cs @@ -179,6 +179,7 @@ namespace OpenTK.Platform .GetField("ErrorExceptions", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic) .SetValue(null, true); + throw_on_error = true; } else if (!value && throw_on_error) { @@ -186,6 +187,7 @@ namespace OpenTK.Platform .GetField("ErrorExceptions", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic) .SetValue(null, false); + throw_on_error = false; } } } diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index 8e08c862..828e5cf4 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -28,7 +28,7 @@ namespace OpenTK.Platform.Windows private WinGLContext glContext; private DisplayMode mode = new DisplayMode(); - private bool fullscreen = false; + private bool fullscreen; private bool disposed; private bool isExiting; private bool exists; diff --git a/Source/OpenTK/Platform/Windows/WinRawKeyboard.cs b/Source/OpenTK/Platform/Windows/WinRawKeyboard.cs index f0a2a3e9..0ceb86f8 100644 --- a/Source/OpenTK/Platform/Windows/WinRawKeyboard.cs +++ b/Source/OpenTK/Platform/Windows/WinRawKeyboard.cs @@ -302,12 +302,10 @@ namespace OpenTK.Platform.Windows } return false; } - break; default: throw new ApplicationException("Windows raw keyboard driver received invalid data."); } - return false; } #endregion