Show a dialog only if no game directories are set (#2690)

* Slightly changed how allInstallDirsDisabled is determined

* Show a dialog only if no game directories are set

* Changed a comment

* Fixed formatting
This commit is contained in:
Ked 2025-03-27 00:04:05 +08:00 committed by GitHub
parent d8204641fa
commit 69cb4d5787
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -157,12 +157,8 @@ int main(int argc, char* argv[]) {
}
}
bool allInstallDirsDisabled =
std::ranges::all_of(Config::getGameInstallDirsEnabled(), [](bool val) { return !val; });
// If no game directory is set and no command line argument, prompt for it
if (Config::getGameInstallDirs().empty() && allInstallDirsDisabled &&
!has_command_line_argument) {
// If no game directories are set and no command line argument, prompt for it
if (Config::getGameInstallDirsEnabled().empty() && !has_command_line_argument) {
GameInstallDialog dlg;
dlg.exec();
}