summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Bessent <lost.dragonist@gmail.com>2021-01-23 13:15:34 -0700
committerChris Bessent <lost.dragonist@gmail.com>2021-01-23 13:26:14 -0700
commit5c3d715cfd5335507033a45bc05351d0b0e458e4 (patch)
tree772f9537f46b72bc71cf2c01734bc83d82353392
parent9997412a39208f2f44b31c6f86d0e58e56551572 (diff)
Fix forced load libraries
This fixes a couple issues. First, the default libraries forced by the game plugins were not being loaded. Second, when the checkbox was disabled, the forced load settings would be wiped out. Both were fixed by always loading and saving the state of the forced loads regardless of the global enabled state.
-rw-r--r--src/editexecutablesdialog.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/editexecutablesdialog.cpp b/src/editexecutablesdialog.cpp
index 6e3cecff..7272e3fd 100644
--- a/src/editexecutablesdialog.cpp
+++ b/src/editexecutablesdialog.cpp
@@ -141,9 +141,10 @@ void EditExecutablesDialog::loadForcedLibraries()
const auto* p = m_organizerCore.currentProfile();
for (const auto& e : m_executablesList) {
- if (p->forcedLibrariesEnabled(e.title())) {
- m_forcedLibraries.set(e.title(), true, p->determineForcedLibraries(e.title()));
- }
+ m_forcedLibraries.set(
+ e.title(),
+ p->forcedLibrariesEnabled(e.title()),
+ p->determineForcedLibraries(e.title()));
}
}
@@ -242,8 +243,8 @@ bool EditExecutablesDialog::commitChanges()
}
if (auto libraryList=m_forcedLibraries.find(e.title())) {
- if (libraryList && libraryList->enabled && !libraryList->value.empty()) {
- profile->setForcedLibrariesEnabled(e.title(), true);
+ if (libraryList && !libraryList->value.empty()) {
+ profile->setForcedLibrariesEnabled(e.title(), libraryList->enabled);
profile->storeForcedLibraries(e.title(), libraryList->value);
}
}