Removed redundant mouse clean up on quit for some platforms.

SDL_MouseQuit() already frees cursors and sets fields to NULL.
This commit is contained in:
Philipp Wiesemann 2017-05-19 23:30:59 +02:00
parent a9c7bc85f1
commit bf8ccf08bb
4 changed files with 0 additions and 47 deletions

View File

@ -262,17 +262,6 @@ Emscripten_InitMouse()
void void
Emscripten_FiniMouse() 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 */ #endif /* SDL_VIDEO_DRIVER_EMSCRIPTEN */

View File

@ -284,17 +284,6 @@ MIR_InitMouse()
void void
MIR_FiniMouse() 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 */ #endif /* SDL_VIDEO_DRIVER_MIR */

View File

@ -392,23 +392,5 @@ Wayland_FiniMouse(void)
/* This effectively assumes that nobody else /* This effectively assumes that nobody else
* touches SDL_Mouse which is effectively * touches SDL_Mouse which is effectively
* a singleton */ * 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 */ #endif /* SDL_VIDEO_DRIVER_WAYLAND */

View File

@ -311,13 +311,6 @@ WIN_InitMouse(_THIS)
void void
WIN_QuitMouse(_THIS) 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. */ if (rawInputEnableCount) { /* force RAWINPUT off here. */
rawInputEnableCount = 1; rawInputEnableCount = 1;
ToggleRawInput(SDL_FALSE); ToggleRawInput(SDL_FALSE);