From eb9d3582d89f3ba7d08baf34ae12e1682443f838 Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 11 Apr 2021 13:52:35 -0700 Subject: [PATCH] Fix incorrect return code from game options and graphic options Pressing return in gameplay options would send you back to the pause menu instead of the general options menu, and pressing return in graphic options would send you back to the pause menu instead of the general options menu, too. Additionally, pressing Esc in graphic options would also send you back to the pause menu instead of the general options menu. Like I said before, the menu system is still a bit hardcoded in some places, and these happened because Terry forgot to update them when he changed the menus around. Fixes #711. --- desktop_version/src/Input.cpp | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index c86aeac5..f9568e50 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -447,15 +447,8 @@ static void menuactionpress(void) default: //back music.playef(11); - if (game.ingame_titlemode) - { - game.returntoingame(); - } - else - { - game.returnmenu(); - map.nexttowercolour(); - } + game.returnmenu(); + map.nexttowercolour(); break; } break; @@ -735,15 +728,8 @@ static void menuactionpress(void) else if (game.currentmenuoption == gameplayoptionsoffset + 4) { //return to previous menu music.playef(11); - if (game.ingame_titlemode) - { - game.returntoingame(); - } - else - { - game.returnmenu(); - map.nexttowercolour(); - } + game.returnmenu(); + map.nexttowercolour(); } break; @@ -1632,8 +1618,7 @@ void titleinput(void) else { if (game.ingame_titlemode - && (game.currentmenuname == Menu::options - || game.currentmenuname == Menu::graphicoptions)) + && game.currentmenuname == Menu::options) { game.returntoingame(); }