From 69cb4d5787a25c98ec7e89a6c17f0c2acef1b1c8 Mon Sep 17 00:00:00 2001 From: Ked <58560148+k3dr1@users.noreply.github.com> Date: Thu, 27 Mar 2025 00:04:05 +0800 Subject: [PATCH] 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 --- src/qt_gui/main.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/qt_gui/main.cpp b/src/qt_gui/main.cpp index 34e429368..bd9dca6ce 100644 --- a/src/qt_gui/main.cpp +++ b/src/qt_gui/main.cpp @@ -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(); }