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
parent d5e6b87231
commit 8ad4f67553
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;