Permalink
Browse files

[SDL] Fixed MouseCursor getting stuck after multiple changes

  • Loading branch information...
1 parent a5ddc53 commit 8568e6dc70ab4143b29e7c8fda574785f27fffd4 @thefiddler thefiddler committed Apr 30, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 Source/OpenTK/Platform/SDL2/Sdl2NativeWindow.cs
@@ -470,22 +470,22 @@ public MouseCursor Cursor
{
lock (sync)
{
- if (value != MouseCursor.Default)
+ if (cursor != value)
{
// Free the previous cursor,
// if one has been set.
if (sdl_cursor != IntPtr.Zero)
{
SDL.FreeCursor(sdl_cursor);
sdl_cursor = IntPtr.Zero;
- cursor = MouseCursor.Default;
}
// Set the new cursor
if (value == MouseCursor.Default)
{
// Reset to default cursor
SDL.SetCursor(SDL.GetDefaultCursor());
+ cursor = value;
}
else
{

0 comments on commit 8568e6d

Please sign in to comment.