Fixed customOverwrite setting for executables.

The setting was not being passed to spawnBinary() and was left empty. Just added a couple lines to pass that too. If the setting is disabled cutomOverwrite should be empty and the normal overwrite folder will be used instead.
This commit is contained in:
Al12rs
2018-01-24 13:43:53 +01:00
parent 8c34131bb8
commit ba0cd0e10d
+4 -3
View File
@@ -1043,12 +1043,13 @@ void MainWindow::startExeAction()
if (action != nullptr) {
const Executable &selectedExecutable(
m_OrganizerCore.executablesList()->find(action->text()));
QString customOverwrite= m_OrganizerCore.currentProfile()->setting("custom_overwrites", selectedExecutable.m_Title).toString();
m_OrganizerCore.spawnBinary(
selectedExecutable.m_BinaryInfo, selectedExecutable.m_Arguments,
selectedExecutable.m_WorkingDirectory.length() != 0
? selectedExecutable.m_WorkingDirectory
: selectedExecutable.m_BinaryInfo.absolutePath(),
selectedExecutable.m_SteamAppID);
selectedExecutable.m_SteamAppID, customOverwrite);
} else {
qCritical("not an action?");
}
@@ -1709,13 +1710,13 @@ void MainWindow::installMod(QString fileName)
void MainWindow::on_startButton_clicked() {
const Executable &selectedExecutable(getSelectedExecutable());
QString customOverwrite = m_OrganizerCore.currentProfile()->setting("custom_overwrites", selectedExecutable.m_Title).toString();
m_OrganizerCore.spawnBinary(
selectedExecutable.m_BinaryInfo, selectedExecutable.m_Arguments,
selectedExecutable.m_WorkingDirectory.length() != 0
? selectedExecutable.m_WorkingDirectory
: selectedExecutable.m_BinaryInfo.absolutePath(),
selectedExecutable.m_SteamAppID);
selectedExecutable.m_SteamAppID, customOverwrite);
}
static HRESULT CreateShortcut(LPCWSTR targetFileName, LPCWSTR arguments,