mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-09 07:50:37 +00:00
[SDL] Fixed MouseCursor getting stuck after multiple changes
This commit is contained in:
parent
a5ddc530c2
commit
8568e6dc70
|
@ -470,7 +470,7 @@ namespace OpenTK.Platform.SDL2
|
||||||
{
|
{
|
||||||
lock (sync)
|
lock (sync)
|
||||||
{
|
{
|
||||||
if (value != MouseCursor.Default)
|
if (cursor != value)
|
||||||
{
|
{
|
||||||
// Free the previous cursor,
|
// Free the previous cursor,
|
||||||
// if one has been set.
|
// if one has been set.
|
||||||
|
@ -478,7 +478,6 @@ namespace OpenTK.Platform.SDL2
|
||||||
{
|
{
|
||||||
SDL.FreeCursor(sdl_cursor);
|
SDL.FreeCursor(sdl_cursor);
|
||||||
sdl_cursor = IntPtr.Zero;
|
sdl_cursor = IntPtr.Zero;
|
||||||
cursor = MouseCursor.Default;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the new cursor
|
// Set the new cursor
|
||||||
|
@ -486,6 +485,7 @@ namespace OpenTK.Platform.SDL2
|
||||||
{
|
{
|
||||||
// Reset to default cursor
|
// Reset to default cursor
|
||||||
SDL.SetCursor(SDL.GetDefaultCursor());
|
SDL.SetCursor(SDL.GetDefaultCursor());
|
||||||
|
cursor = value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue