1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-13 11:02:47 +01:00

Fix #23443: New GOG version of RCT2 is not extracted correctly

This commit is contained in:
Michael Steenbeek
2025-03-30 21:30:56 +02:00
committed by GitHub
parent b1e8ac1d40
commit 47e0d80885
2 changed files with 13 additions and 7 deletions

View File

@@ -16,6 +16,7 @@
- Fix: [#18169] CJK, Arabic and Vietnamese display all text as ??? on Android. - Fix: [#18169] CJK, Arabic and Vietnamese display all text as ??? on Android.
- Fix: [#18309] Flying and Multi Dimension trains glitch when changing between inverted and uninverted track when uncap fps is on. - Fix: [#18309] Flying and Multi Dimension trains glitch when changing between inverted and uninverted track when uncap fps is on.
- Fix: [#19506] Queue paths can be placed on level crossings by replacing an existing regular path. - Fix: [#19506] Queue paths can be placed on level crossings by replacing an existing regular path.
- Fix: [#23443] New GOG version of RCT2 is not extracted correctly.
- Fix: [#23486] Object selection minimum requirements can be bypassed with close window hotkey. - Fix: [#23486] Object selection minimum requirements can be bypassed with close window hotkey.
- Fix: [#23743] Parks with guest goals over 32767 do not appear in the scenario list. - Fix: [#23743] Parks with guest goals over 32767 do not appear in the scenario list.
- Fix: [#23844] Sound effects keep playing when loading another save. - Fix: [#23844] Sound effects keep playing when loading another save.

View File

@@ -887,10 +887,10 @@ namespace OpenRCT2::Config
chosenOption = hdd; chosenOption = hdd;
} }
std::string installPath; std::vector<std::string> possibleInstallPaths{};
if (chosenOption == hdd) if (chosenOption == hdd)
{ {
installPath = uiContext->ShowDirectoryDialog(LanguageGetString(STR_PICK_RCT2_DIR)); possibleInstallPaths.emplace_back(uiContext->ShowDirectoryDialog(LanguageGetString(STR_PICK_RCT2_DIR)));
} }
else if (chosenOption == gog) else if (chosenOption == gog)
{ {
@@ -923,17 +923,22 @@ namespace OpenRCT2::Config
uiContext->ShowMessageBox(LanguageGetString(STR_NOT_THE_GOG_INSTALLER)); uiContext->ShowMessageBox(LanguageGetString(STR_NOT_THE_GOG_INSTALLER));
} }
installPath = Path::Combine(dest, u8"app"); // New installer extracts to dest, old installer installs in dest/app.
possibleInstallPaths.emplace_back(dest);
possibleInstallPaths.emplace_back(Path::Combine(dest, u8"app"));
} }
if (installPath.empty()) if (possibleInstallPaths.empty())
{ {
return false; return false;
} }
Get().general.RCT2Path = installPath;
if (Platform::OriginalGameDataExists(installPath)) for (const auto& possiblePath : possibleInstallPaths)
{ {
return true; if (Platform::OriginalGameDataExists(possiblePath))
{
Get().general.RCT2Path = possiblePath;
return true;
}
} }
uiContext->ShowMessageBox(FormatStringIDLegacy(STR_COULD_NOT_FIND_AT_PATH, &g1DatPath)); uiContext->ShowMessageBox(FormatStringIDLegacy(STR_COULD_NOT_FIND_AT_PATH, &g1DatPath));