aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sdl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sdl.c b/sdl.c
index 15427c5271..2ce6e81522 100644
--- a/sdl.c
+++ b/sdl.c
@@ -286,9 +286,12 @@ static void sdl_grab_start(void)
SDL_WarpMouse(guest_x, guest_y);
} else
sdl_hide_cursor();
- SDL_WM_GrabInput(SDL_GRAB_ON);
- gui_grab = 1;
- sdl_update_caption();
+
+ if (SDL_WM_GrabInput(SDL_GRAB_ON) == SDL_GRAB_ON) {
+ gui_grab = 1;
+ sdl_update_caption();
+ } else
+ sdl_show_cursor();
}
static void sdl_grab_end(void)