mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-02 03:35:09 +01:00
Fix #25221: When trying to cancel game file discovery, the prompt reappears
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
- Improved: [#25765] The ‘View options’ and ‘Special track elements’ dropdowns no longer need click-and-hold.
|
||||
- Improved: [#25858] macOS now supports the onboarding menu.
|
||||
- Fix: [#4643, #25167] Many metal supports draw with a filled in top when they didn't in vanilla, causing some slight misalignment and glitching.
|
||||
- Fix: [#25221] When trying to cancel game file discovery, the prompt reappears.
|
||||
- Fix: [#25739] Game freezes when a tab in the New Ride window contains more than 384 items.
|
||||
- Fix: [#25745] Crash when a player connection is aborted early.
|
||||
- Fix: [#25799] The animated options tab icon of the news window does not always redraw.
|
||||
|
||||
@@ -394,7 +394,7 @@ namespace OpenRCT2::Ui
|
||||
}
|
||||
}
|
||||
|
||||
return options.size();
|
||||
return -1;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -942,11 +942,16 @@ namespace OpenRCT2::Config
|
||||
options.push_back(exit);
|
||||
int optionIndex = uiContext.ShowMenuDialog(
|
||||
options, LanguageGetString(STR_OPENRCT2_SETUP), LanguageGetString(STR_WHICH_APPLIES_BEST));
|
||||
if (optionIndex < 0 || static_cast<uint32_t>(optionIndex) >= options.size())
|
||||
// Error while trying to show menu options, fall back.
|
||||
if (optionIndex < 0)
|
||||
{
|
||||
// graceful fallback if app errors or user exits out of window
|
||||
chosenOption = hdd;
|
||||
}
|
||||
// User clicked the Cancel or Close button
|
||||
else if (static_cast<uint32_t>(optionIndex) >= options.size())
|
||||
{
|
||||
chosenOption = exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
chosenOption = options[optionIndex];
|
||||
@@ -960,7 +965,9 @@ namespace OpenRCT2::Config
|
||||
std::vector<std::string> possibleInstallPaths{};
|
||||
if (chosenOption == hdd)
|
||||
{
|
||||
possibleInstallPaths.emplace_back(uiContext.ShowDirectoryDialog(LanguageGetString(STR_PICK_RCT2_DIR)));
|
||||
auto pickedPath = uiContext.ShowDirectoryDialog(LanguageGetString(STR_PICK_RCT2_DIR));
|
||||
if (!pickedPath.empty())
|
||||
possibleInstallPaths.emplace_back(pickedPath);
|
||||
}
|
||||
else if (chosenOption == gog)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user