From 5c3d715cfd5335507033a45bc05351d0b0e458e4 Mon Sep 17 00:00:00 2001 From: Chris Bessent Date: Sat, 23 Jan 2021 13:15:34 -0700 Subject: 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. --- src/editexecutablesdialog.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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); } } -- cgit v1.3.1