From a6e1dd56db8dd5e8fd02061198fd2dfdb4b74bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20=C5=9Aniatowski?= Date: Tue, 2 Sep 2008 12:08:03 +0100 Subject: [PATCH] make editor2's quit to desktop always work --- src/game.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 1482f3965e6..f9a36a05d31 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1124,9 +1124,7 @@ bool game_controller::goto_editor() { if(jump_to_editor_){ jump_to_editor_ = false; - if (start_editor() != editor2::EXIT_QUIT_TO_DESKTOP){ - ; - }else{ + if (start_editor() == editor2::EXIT_QUIT_TO_DESKTOP) { return false; } } @@ -2063,8 +2061,11 @@ static int play_game(int argc, char** argv) #ifdef USE_EDITOR2 } else if(res == gui::START_MAP_EDITOR) { //@todo editor can ask the game to quit completely - game.start_editor(); - gui::set_background_dirty(); + if (game.start_editor() == editor2::EXIT_QUIT_TO_DESKTOP) { + return 0; + } else { + gui::set_background_dirty(); + } continue; #endif }