From bc9cb3794225d9b13eb26747e3eee0b54fc45cd6 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Wed, 13 Jan 2021 20:36:11 +0100 Subject: Add comment for cdUp(). --- src/settingsdialogpaths.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/settingsdialogpaths.cpp') 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(); -- cgit v1.3.1