From c60c97b1d4e573a45f6bef030284e915bb5b83f6 Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Sun, 28 Apr 2002 06:51:23 +0000 Subject: [PATCH] Prevent debugger attach when we have switched to full-screen. svn-id: r4125 --- scummvm.cpp | 2 +- sdl.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scummvm.cpp b/scummvm.cpp index bf48a135f73..ee727b99700 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -1171,7 +1171,7 @@ void Scumm::waitForTimer(int msec_delay) { _fastMode ^= 1; else if (event.kbd.keycode=='g') _fastMode ^= 2; - else if (event.kbd.keycode=='d') + else if ((event.kbd.keycode=='d') && (_fullScreen == false)) g_debugger.attach(this); else if (event.kbd.keycode=='s') resourceStats(); diff --git a/sdl.cpp b/sdl.cpp index 6f786bb18d3..8ac4218d2a8 100644 --- a/sdl.cpp +++ b/sdl.cpp @@ -904,7 +904,8 @@ uint32 OSystem_SDL::property(int param, uint32 value) { case PROP_TOGGLE_FULLSCREEN: _full_screen ^= true; - + g_scumm->_fullScreen = _full_screen; + if (!SDL_WM_ToggleFullScreen(sdl_hwscreen)) { /* if ToggleFullScreen fails, achieve the same effect with hotswap gfx mode */ hotswap_gfx_mode();