summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-13 20:36:11 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-13 20:36:11 +0100
commitbc9cb3794225d9b13eb26747e3eee0b54fc45cd6 (patch)
tree73be02d3b1ea0b202875e82c085de766dfbfe8bd
parent97ac1ce9994d88934e316182c33aab31ad2c79b6 (diff)
Add comment for cdUp().
-rw-r--r--src/settingsdialogpaths.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/settingsdialogpaths.cpp b/src/settingsdialogpaths.cpp
index 197f1807..aafa750c 100644
--- a/src/settingsdialogpaths.cpp
+++ b/src/settingsdialogpaths.cpp
@@ -168,6 +168,13 @@ void PathsSettingsTab::on_browseGameDirBtn_clicked()
return;
}
+ // we need to find the game folder corresponding to the executable
+ //
+ // some game plugins have executable in subfolder, e.g. bin/game.exe,
+ // so we need to go up the parent folders until the concatenation of
+ // the folder and the binary path equals the game executable specified
+ // by the user
+ //
QFileInfo newExe(temp);
const auto binaryPath = settings().game().plugin()->binaryName();
QDir folder = newExe.absoluteDir();