From 99a1562d87cd376ae9eed5d7d6ed99754b72a93b Mon Sep 17 00:00:00 2001 From: Dav999 Date: Thu, 8 Feb 2024 18:30:28 +0100 Subject: [PATCH] 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). --- desktop_version/src/main.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/main.cpp b/desktop_version/src/main.cpp index 18f72297..1dc9f989 100644 --- a/desktop_version/src/main.cpp +++ b/desktop_version/src/main.cpp @@ -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;