X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=platform%2Fsdlv.cpp;h=66ff48acbcabfb88fbb78f99478b8959cfa06748;hb=ed0378fbba2197526e02534425ead21101b2e0f9;hp=535a899680ae343dbe733a8e0a5f307cf4ed0ac3;hpb=96b93ff5f9e7aef51e96b218ddb2c7a7f658b7da;p=drnoksnes diff --git a/platform/sdlv.cpp b/platform/sdlv.cpp index 535a899..66ff48a 100644 --- a/platform/sdlv.cpp +++ b/platform/sdlv.cpp @@ -113,6 +113,9 @@ static void setupVideoSurface() GUI.Width = gameWidth; GUI.Height = gameHeight; #endif +#if CONF_EXIT_BUTTON + exitReset(); +#endif // Safeguard if (gameHeight > GUI.Height || gameWidth > GUI.Width) @@ -160,14 +163,15 @@ static void drawOnscreenControls() { if (Config.touchscreenInput) { S9xInputScreenChanged(); - if (Config.touchscreenShow) { - scaler->pause(); - SDL_FillRect(screen, NULL, 0); - S9xInputScreenDraw(Settings.SixteenBit ? 2 : 1, - screen->pixels, screen->pitch); - SDL_Flip(screen); - scaler->resume(); - } + } + + if (Config.touchscreenShow) { + scaler->pause(); + SDL_FillRect(screen, NULL, 0); + S9xInputScreenDraw(Settings.SixteenBit ? 2 : 1, + screen->pixels, screen->pitch); + SDL_Flip(screen); + scaler->resume(); } } @@ -239,6 +243,15 @@ bool8_32 S9xDeinitUpdate (int width, int height, bool8_32 sixteenBit) { scaler->finish(); +#if CONF_EXIT_BUTTON + if (exitRequiresDraw()) { + //scaler->pause(); + exitDraw(screen); + SDL_Flip(screen); + //scaler->resume(); + } +#endif + return TRUE; }