[SDL] Fixed MouseCursor getting stuck after multiple changes
This commit is contained in:
parent
a5ddc530c2
commit
8568e6dc70
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue