mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-06-20 07:27:49 +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();
|
DestroyWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sdl_cursor != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
SDL.FreeCursor(sdl_cursor);
|
||||||
|
sdl_cursor = IntPtr.Zero;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1639,6 +1639,12 @@ namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
if (calledManually)
|
if (calledManually)
|
||||||
{
|
{
|
||||||
|
if (Cursor != MouseCursor.Default && curson_handle != IntPtr.Zero)
|
||||||
|
{
|
||||||
|
Functions.DestroyIcon(curson_handle);
|
||||||
|
curson_handle = IntPtr.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
// Safe to clean managed resources
|
// Safe to clean managed resources
|
||||||
DestroyWindow();
|
DestroyWindow();
|
||||||
if (Icon != null)
|
if (Icon != null)
|
||||||
|
|
Loading…
Reference in a new issue