diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-13 14:18:17 -0500 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-04-13 14:18:17 -0500 |
| commit | 145fc7f610cc4607c42ad55c37317bdd93223fbf (patch) | |
| tree | 2e990f13cf0e85c33e9dd1c9d344925d30fa1012 /libs | |
| parent | a2fd27434339913124f4d0a88eb19b13a70e19a4 (diff) | |
Remove Fix Game Registries button, fix BethINI New Vegas detection
The auto-prompt in organizercore already offers to fix the registry
on launch, so the manual button is redundant.
BethINI Pie plugin compared against managedGame()->gameName(), but
GameFalloutNV returns "New Vegas" while BethINI's app folder is
"Fallout New Vegas" — add an alias map so NV is detected correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/tool_bethinipie/src/bethinipie.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/libs/tool_bethinipie/src/bethinipie.cpp b/libs/tool_bethinipie/src/bethinipie.cpp index 152e809..659a7d6 100644 --- a/libs/tool_bethinipie/src/bethinipie.cpp +++ b/libs/tool_bethinipie/src/bethinipie.cpp @@ -30,7 +30,18 @@ static const char* GITHUB_REPO = "SulfurNitride/Fluorine-Bethini-Pie-Performanc static const char* RELEASE_TAG = "latest"; static const char* ASSET_NAME = "BethiniPie-linux.tar.gz"; -// Maps Fluorine gameName() to BethIni Pie's Bethini.json INI directory key +// Maps Fluorine managedGame()->gameName() to the BethINI Pie app name. +// MO2 game plugins sometimes return a short name (e.g. "New Vegas") that +// differs from BethINI Pie's app folder name ("Fallout New Vegas"). +static const QMap<QString, QString> s_MO2ToBethiniName = { + {"Skyrim Special Edition", "Skyrim Special Edition"}, + {"Fallout 4", "Fallout 4"}, + {"Fallout New Vegas", "Fallout New Vegas"}, + {"New Vegas", "Fallout New Vegas"}, + {"Starfield", "Starfield"}, +}; + +// Maps the BethINI Pie app name to its Bethini.json INI directory key. static const QMap<QString, QString> s_GameIniKeys = { {"Skyrim Special Edition", "sSkyrim Special EditionINIPath"}, {"Fallout 4", "sFallout 4INIPath"}, @@ -125,10 +136,8 @@ QString BethiniPie::bethiniGameName() const { if (!m_MOInfo || !m_MOInfo->managedGame()) return {}; - QString game = m_MOInfo->managedGame()->gameName(); - if (s_GameIniKeys.contains(game)) - return game; - return {}; + const QString mo2Name = m_MOInfo->managedGame()->gameName(); + return s_MO2ToBethiniName.value(mo2Name); } QString BethiniPie::iniDirectoryKey() const |
