mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-02 15:31:01 +00:00
[SDL][Win] Destroy custom cursor on Close()
X11 destroys the cursor after setting it and Cocoa uses an autorelease pool, so that should not be necessary there.
This commit is contained in:
parent
c8c0d32fcc
commit
9988a2ba9c
|
@ -1057,6 +1057,12 @@ namespace OpenTK.Platform.SDL2
|
|||
{
|
||||
DestroyWindow();
|
||||
}
|
||||
|
||||
if (sdl_cursor != IntPtr.Zero)
|
||||
{
|
||||
SDL.FreeCursor(sdl_cursor);
|
||||
sdl_cursor = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -1639,6 +1639,12 @@ namespace OpenTK.Platform.Windows
|
|||
{
|
||||
if (calledManually)
|
||||
{
|
||||
if (Cursor != MouseCursor.Default && curson_handle != IntPtr.Zero)
|
||||
{
|
||||
Functions.DestroyIcon(curson_handle);
|
||||
curson_handle = IntPtr.Zero;
|
||||
}
|
||||
|
||||
// Safe to clean managed resources
|
||||
DestroyWindow();
|
||||
if (Icon != null)
|
||||
|
|
Loading…
Reference in a new issue