Removed redundant mouse clean up on quit for some platforms. SDL_MouseQuit() already frees cursors and sets fields to NULL.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
diff --git a/src/video/emscripten/SDL_emscriptenmouse.c b/src/video/emscripten/SDL_emscriptenmouse.c
index 22fbd13..8232dac 100644
--- a/src/video/emscripten/SDL_emscriptenmouse.c
+++ b/src/video/emscripten/SDL_emscriptenmouse.c
@@ -262,17 +262,6 @@ Emscripten_InitMouse()
void
Emscripten_FiniMouse()
{
- SDL_Mouse* mouse = SDL_GetMouse();
-
- Emscripten_FreeCursor(mouse->def_cursor);
- mouse->def_cursor = NULL;
-
- mouse->CreateCursor = NULL;
- mouse->ShowCursor = NULL;
- mouse->FreeCursor = NULL;
- mouse->WarpMouse = NULL;
- mouse->CreateSystemCursor = NULL;
- mouse->SetRelativeMouseMode = NULL;
}
#endif /* SDL_VIDEO_DRIVER_EMSCRIPTEN */
diff --git a/src/video/mir/SDL_mirmouse.c b/src/video/mir/SDL_mirmouse.c
index 5d00dc0..0acffe6 100644
--- a/src/video/mir/SDL_mirmouse.c
+++ b/src/video/mir/SDL_mirmouse.c
@@ -284,17 +284,6 @@ MIR_InitMouse()
void
MIR_FiniMouse()
{
- SDL_Mouse* mouse = SDL_GetMouse();
-
- MIR_FreeCursor(mouse->def_cursor);
- mouse->def_cursor = NULL;
-
- mouse->CreateCursor = NULL;
- mouse->ShowCursor = NULL;
- mouse->FreeCursor = NULL;
- mouse->WarpMouse = NULL;
- mouse->CreateSystemCursor = NULL;
- mouse->SetRelativeMouseMode = NULL;
}
#endif /* SDL_VIDEO_DRIVER_MIR */
diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c
index 12f8bd3..d621aca 100644
--- a/src/video/wayland/SDL_waylandmouse.c
+++ b/src/video/wayland/SDL_waylandmouse.c
@@ -392,23 +392,5 @@ Wayland_FiniMouse(void)
/* This effectively assumes that nobody else
* touches SDL_Mouse which is effectively
* a singleton */
-
- SDL_Mouse *mouse = SDL_GetMouse();
-
- /* Free the current cursor if not the same pointer as
- * the default cursor */
- if (mouse->def_cursor != mouse->cur_cursor)
- Wayland_FreeCursor (mouse->cur_cursor);
-
- Wayland_FreeCursor (mouse->def_cursor);
- mouse->def_cursor = NULL;
- mouse->cur_cursor = NULL;
-
- mouse->CreateCursor = NULL;
- mouse->CreateSystemCursor = NULL;
- mouse->ShowCursor = NULL;
- mouse->FreeCursor = NULL;
- mouse->WarpMouse = NULL;
- mouse->SetRelativeMouseMode = NULL;
}
#endif /* SDL_VIDEO_DRIVER_WAYLAND */
diff --git a/src/video/windows/SDL_windowsmouse.c b/src/video/windows/SDL_windowsmouse.c
index d64a495..51da4be 100644
--- a/src/video/windows/SDL_windowsmouse.c
+++ b/src/video/windows/SDL_windowsmouse.c
@@ -311,13 +311,6 @@ WIN_InitMouse(_THIS)
void
WIN_QuitMouse(_THIS)
{
- SDL_Mouse *mouse = SDL_GetMouse();
- if ( mouse->def_cursor ) {
- SDL_free(mouse->def_cursor);
- mouse->def_cursor = NULL;
- mouse->cur_cursor = NULL;
- }
-
if (rawInputEnableCount) { /* force RAWINPUT off here. */
rawInputEnableCount = 1;
ToggleRawInput(SDL_FALSE);