Skip to content

Commit

Permalink
Fixed spurious SDL error on shutdown if mouse capture isn't supported
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 15, 2014
1 parent 89127c2 commit 348cf3e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/events/SDL_mouse.c
Expand Up @@ -430,7 +430,9 @@ SDL_MouseQuit(void)
SDL_Cursor *cursor, *next;
SDL_Mouse *mouse = SDL_GetMouse();

SDL_CaptureMouse(SDL_FALSE);
if (mouse->CaptureMouse) {
SDL_CaptureMouse(SDL_FALSE);
}
SDL_SetRelativeMouseMode(SDL_FALSE);
SDL_ShowCursor(1);

Expand Down

0 comments on commit 348cf3e

Please sign in to comment.