From: Christoph Sommer Date: Wed, 26 Apr 2006 12:23:41 +0000 (+0000) Subject: on_escape_press is now handled first in GameSession::update(). Using ESC to close... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5817bb1e56a076dd7c933968299f8d68654c81bb;p=supertux.git on_escape_press is now handled first in GameSession::update(). Using ESC to close the pause menu would otherwise immediately re-open it. SVN-Revision: 3441 --- diff --git a/src/game_session.cpp b/src/game_session.cpp index 9deb15338..5cfa5adaa 100644 --- a/src/game_session.cpp +++ b/src/game_session.cpp @@ -445,15 +445,15 @@ GameSession::setup() void GameSession::update(float elapsed_time) { + // handle controller + if(main_controller->pressed(Controller::PAUSE_MENU)) + on_escape_press(); + process_events(); process_menu(); check_end_conditions(); - // handle controller - if(main_controller->pressed(Controller::PAUSE_MENU)) - on_escape_press(); - // respawning in new sector? if(newsector != "" && newspawnpoint != "") { Sector* sector = level->get_sector(newsector);