From b72a81120e4294458e6d04b069e74ba545a06c86 Mon Sep 17 00:00:00 2001 From: theoddone33 <> Date: Thu, 19 Apr 2001 19:11:34 +0000 Subject: [PATCH] Mouse now grabbed in fullscreen modes to take advantage of SDL's DGA stuff. --- zsnes/src/linux/sdllink.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/zsnes/src/linux/sdllink.c b/zsnes/src/linux/sdllink.c index dfc76bb0..3bf70831 100644 --- a/zsnes/src/linux/sdllink.c +++ b/zsnes/src/linux/sdllink.c @@ -1271,7 +1271,10 @@ int startgame(void) SurfaceY); return FALSE; } - + + // Grab mouse in fullscreen mode + FullScreen ? SDL_WM_GrabInput(SDL_GRAB_ON) : SDL_WM_GrabInput(SDL_GRAB_OFF); + /* Need to handle situations where BPP is not what we can handle */ SDL_WM_SetCaption ("ZSNES Linux","ZSNES"); SDL_ShowCursor(0); @@ -2399,7 +2402,11 @@ void drawscreenwin(void) void LinuxExit (void) { - if (sdl_inited) SDL_Quit(); + if (sdl_inited) + { + SDL_WM_GrabInput(SDL_GRAB_OFF); // probably redundant + SDL_Quit(); + } exit(0); }