From 4356601d210cb71780f547fd446c48cd16b57c46 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Fri, 31 Aug 2007 16:10:38 +0000 Subject: [PATCH] Corrected a couple of compiler warnings. --- Source/OpenTK/Platform/Utilities.cs | 2 ++ Source/OpenTK/Platform/Windows/WinGLNative.cs | 2 +- Source/OpenTK/Platform/Windows/WinRawKeyboard.cs | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) 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