diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 9cb4fd2c..af0780a0 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -4037,7 +4037,7 @@ void MenuStateCustomGame::setupUIFromGameSettings(const GameSettings &gameSettin listBoxMap.setSelectedItem(formatString(scenarioInfo.mapName)); } else { - printf("gameSettings.getMapFilter()=%d \n",gameSettings.getMapFilter()); + //printf("gameSettings.getMapFilter()=%d \n",gameSettings.getMapFilter()); if(gameSettings.getMapFilter() == 0) { listBoxMapFilter.setSelectedItemIndex(0); } diff --git a/source/shared_lib/include/platform/sdl/window.h b/source/shared_lib/include/platform/sdl/window.h index 1c73626a..22fdb2fe 100644 --- a/source/shared_lib/include/platform/sdl/window.h +++ b/source/shared_lib/include/platform/sdl/window.h @@ -106,10 +106,6 @@ private: static bool isFullScreen; static SDL_keysym keystate; static bool tryVSynch; - static int64 lastToggle; - - static void setLastToggle(int64 lastToggle) {Window::lastToggle = lastToggle;} - static int64 getLastToggle() {return Window::lastToggle;} static void setLastMouseEvent(int64 lastMouseEvent) {Window::lastMouseEvent = lastMouseEvent;} static int64 getLastMouseEvent() {return Window::lastMouseEvent;} diff --git a/source/shared_lib/sources/platform/sdl/window.cpp b/source/shared_lib/sources/platform/sdl/window.cpp index cdf57e0c..3eca0453 100644 --- a/source/shared_lib/sources/platform/sdl/window.cpp +++ b/source/shared_lib/sources/platform/sdl/window.cpp @@ -48,7 +48,6 @@ MouseState Window::mouseState; bool Window::isKeyPressedDown = false; bool Window::isFullScreen = false; SDL_keysym Window::keystate; -int64 Window::lastToggle = -1000; bool Window::isActive = false; #ifdef WIN32 @@ -145,7 +144,6 @@ Window::Window() { Window::isActive = true; lastMouseEvent = 0; - lastToggle = -1000; mousePos = Vec2i(0); mouseState.clear(); @@ -175,7 +173,6 @@ Window::Window(SDL_Window *sdlWindow) { Window::isActive = true; lastMouseEvent = 0; - lastToggle = -1000; mousePos = Vec2i(0); mouseState.clear(); @@ -350,7 +347,7 @@ bool Window::handleEvent() { // // also prevent ` and/or ~ appearing in console every time it's toggled. SDL_Keymod mod = SDL_GetModState(); if (!isUnprintableChar(event.key.keysym,mod)) { - //printf("In SDL_KEYDOWN key SKIP [%d]\n",event.key.keysym.sym); + printf("In SDL_KEYDOWN key SKIP [%d]\n",event.key.keysym.sym); break; } codeLocation = "i"; @@ -368,12 +365,7 @@ bool Window::handleEvent() { // handle ALT+Return if( (keyName == "Return" || keyName == "Enter") && (event.key.keysym.mod & (KMOD_LALT | KMOD_RALT))) { - if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d] SDLK_RETURN pressed.\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__); - - if(Chrono::getCurMillis()-getLastToggle()>1000){ - toggleFullscreen(); - setLastToggle(Chrono::getCurMillis()); - } + toggleFullscreen(); keyDownConsumed=true; } #ifdef WIN32