1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02:00

Fix possible title screen from in-game if command-line playtesting

In 8484b36198, I fixed the title screen
showing up if you go to the language screen from in-game, while not
having any language files. There was also one other possible way to get
this to happen that I missed though: if you do have language files, and
you have not set your language yet, and you start a playtest via the
command line (e.g. by using Ved), and you then change the language
from the in-game options. That is now fixed.
This commit is contained in:
Dav999 2023-09-10 15:00:20 +02:00 committed by Misa Elizabeth Kai
parent 4ae6c77110
commit fcf034583b

View File

@ -1037,6 +1037,7 @@ static void menuactionpress(void)
{
music.playef(Sound_VIRIDIAN);
loc::loadlanguagelist();
loc::pre_title_lang_menu = false;
game.createmenu(Menu::language);
game.currentmenuoption = loc::languagelist_curlang;
map.nexttowercolour();
@ -1114,16 +1115,13 @@ static void menuactionpress(void)
if (loc::pre_title_lang_menu)
{
/* Make the title screen appear, we haven't seen it yet */
/* Make the title screen appear, we haven't seen it yet.
* game.returnmenu() works because Menu::mainmenu
* is created before the language menu. */
game.menustart = false;
game.createmenu(Menu::mainmenu);
game.currentmenuoption = 0;
loc::pre_title_lang_menu = false;
}
else
{
game.returnmenu();
}
game.returnmenu();
map.nexttowercolour();
game.savestatsandsettings_menu();