From 517ad65bdc1de202fd1ad2047194ca69a26c8f77 Mon Sep 17 00:00:00 2001 From: punkrockguy318 Date: Sat, 2 Mar 2013 19:19:01 +0000 Subject: [PATCH] sdl: show cursor and release wm grab on pause --- src/drivers/sdl/input.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/drivers/sdl/input.cpp b/src/drivers/sdl/input.cpp index 65edc288..464fda6d 100644 --- a/src/drivers/sdl/input.cpp +++ b/src/drivers/sdl/input.cpp @@ -195,25 +195,19 @@ void TogglePause () { FCEUI_ToggleEmulationPause (); - int x; - g_config->getOption ("SDL.Fullscreen", &x); - if (x == 0) - return; - - g_config->getOption ("SDL.NoFullscreenCursor", &x); - - if (x == 1) - return; + int no_cursor; + g_config->getOption("SDL.NoFullscreenCursor", &no_cursor); if (FCEUI_EmulationPaused () == 0) { - SDL_ShowCursor (0); SDL_WM_GrabInput (SDL_GRAB_ON); + if(no_cursor) + SDL_ShowCursor (0); } else { - SDL_ShowCursor (1); SDL_WM_GrabInput (SDL_GRAB_OFF); + SDL_ShowCursor (1); } return;