From: Ingo Ruhnke Date: Wed, 30 Jul 2014 18:32:30 +0000 (+0200) Subject: Fixed crash when enabling console X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e7b6de66f52eaf5ac50a6d15754adbc9e3966418;p=supertux.git Fixed crash when enabling console --- diff --git a/src/supertux/screen_manager.cpp b/src/supertux/screen_manager.cpp index 353f20951..add990f65 100644 --- a/src/supertux/screen_manager.cpp +++ b/src/supertux/screen_manager.cpp @@ -191,7 +191,6 @@ void ScreenManager::process_events() { g_jk_controller->update(); -const Uint8 *keystate = SDL_GetKeyboardState(NULL); //edited by giby SDL_Event event; while(SDL_PollEvent(&event)) { @@ -234,8 +233,7 @@ const Uint8 *keystate = SDL_GetKeyboardState(NULL); //edited by giby take_screenshot(); } else if (event.key.keysym.sym == SDLK_F1 && - (keystate[SDLK_LCTRL] || keystate[SDLK_RCTRL]) && - keystate[SDLK_c]) + event.key.keysym.mod & KMOD_CTRL) { Console::instance->toggle(); g_config->console_enabled = true;