summaryrefslogtreecommitdiff
path: root/src/events/SDL_mouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/events/SDL_mouse.c')
-rw-r--r--src/events/SDL_mouse.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index 5536ab73b7..e9404f0577 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -361,6 +361,23 @@ SDL_SendMouseWheel(SDL_Window * window, SDL_MouseID mouseID, int x, int y)
void
SDL_MouseQuit(void)
{
+ SDL_Cursor *cursor, *next;
+ SDL_Mouse *mouse = SDL_GetMouse();
+
+ SDL_ShowCursor(1);
+
+ cursor = mouse->cursors;
+ while (cursor) {
+ next = cursor->next;
+ SDL_FreeCursor(cursor);
+ cursor = next;
+ }
+
+ if (mouse->def_cursor && mouse->FreeCursor) {
+ mouse->FreeCursor(mouse->def_cursor);
+ }
+
+ SDL_zerop(mouse);
}
Uint32