mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 00:59:41 +01:00
MemStick: Fix the missing file browser popup and the folder switch error
- Cancel on the "missing file browser" popup opened the help page anyway, and More info closed the memstick screen as if a folder had been picked, because any child dialog finishing with DR_OK did that. - When switching to the new folder failed, the error was set but never shown. After a move, the screen was left with no buttons. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5de5a1b74a
commit
33e700350e
1 file changed
+6
-1
@@ -442,6 +442,9 @@ void MemStickScreen::Browse(UI::EventParams ¶ms) {
|
||||
nw->T("Error"), // from the networking category of strings.
|
||||
ms->T("MissingFileBrowserError", "This device is missing a file/folder browser. If you disabled the 'Files' app, please enable it and try again."),
|
||||
di->T("More info"), di->T("Cancel"), [](bool ok) {
|
||||
if (!ok) {
|
||||
return;
|
||||
}
|
||||
System_LaunchUrl(LaunchUrlType::BROWSER_URL, "https://www.ppsspp.org/docs/troubleshooting/cant-pick-folder/");
|
||||
}
|
||||
));
|
||||
@@ -450,7 +453,8 @@ void MemStickScreen::Browse(UI::EventParams ¶ms) {
|
||||
}
|
||||
|
||||
void MemStickScreen::dialogFinished(const Screen *dialog, DialogResult result) {
|
||||
if (result == DialogResult::DR_OK) {
|
||||
// Other popups, like the missing file browser error, also finish with DR_OK.
|
||||
if (result == DialogResult::DR_OK && !strcmp(dialog->tag(), "ConfirmMemstickMove")) {
|
||||
INFO_LOG(Log::System, "Confirmation screen done - moving on.");
|
||||
// There's a screen manager bug if we call TriggerFinish directly.
|
||||
// Can't be bothered right now, so we pick this up in update().
|
||||
@@ -658,6 +662,7 @@ void ConfirmMemstickMoveScreen::FinishFolderMove() {
|
||||
if (!SwitchMemstickFolderTo(newMemstickFolder_)) {
|
||||
// TODO: More precise errors.
|
||||
error_ = ms->T("That folder doesn't work as a memstick folder.");
|
||||
RecreateViews();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user