Only re-show language screen in default basedir

After some discussion about the previous commit, the usecase of
managing tons of basedirs and locking files in the filesystem might
mean it gets annoying to have the language screen show up again
whenever a new language is added, for a small group of people. The
solution to get the best of both worlds is to only re-ask for the
language in the default basedir. This means barely anyone will miss
their language having been newly added (especially since barely anyone
will use any custom basedirs, let alone ONLY custom ones).
This commit is contained in:
Dav999 2024-02-08 18:30:28 +01:00 committed by Misa Elizabeth Kai
parent fbc3bd4d5a
commit 99a1562d87
1 changed files with 9 additions and 1 deletions

View File

@ -674,7 +674,15 @@ int main(int argc, char *argv[])
game.gamestate = TITLEMODE;
if (game.slowdown == 0) game.slowdown = 30;
if (loc::lang_set < loc::lang_set_current && !loc::languagelist.empty())
int min_lang_set = loc::lang_set_current;
if (baseDir != NULL)
{
/* For people who manage tons of basedirs, never re-ask
* the language, except in the default basedir. */
min_lang_set = 1;
}
if (loc::lang_set < min_lang_set && !loc::languagelist.empty())
{
loc::pre_title_lang_menu = true;
game.gamestate = TITLEMODE;