sdl: show cursor and release wm grab on pause

This commit is contained in:
punkrockguy318 2013-03-02 19:19:01 +00:00
parent de9e21f12e
commit 517ad65bdc
1 changed files with 5 additions and 11 deletions

View File

@ -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;