From 8568e6dc70ab4143b29e7c8fda574785f27fffd4 Mon Sep 17 00:00:00 2001 From: thefiddler Date: Wed, 30 Apr 2014 13:46:44 +0200 Subject: [PATCH] [SDL] Fixed MouseCursor getting stuck after multiple changes --- Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs b/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs index 2506e13..4831526 100644 --- a/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs +++ b/Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs @@ -470,7 +470,7 @@ namespace OpenTK.Platform.SDL2 { lock (sync) { - if (value != MouseCursor.Default) + if (cursor != value) { // Free the previous cursor, // if one has been set. @@ -478,7 +478,6 @@ namespace OpenTK.Platform.SDL2 { SDL.FreeCursor(sdl_cursor); sdl_cursor = IntPtr.Zero; - cursor = MouseCursor.Default; } // Set the new cursor @@ -486,6 +485,7 @@ namespace OpenTK.Platform.SDL2 { // Reset to default cursor SDL.SetCursor(SDL.GetDefaultCursor()); + cursor = value; } else { -- 2.7.4