mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-22 10:49:05 +02:00
VSH: Insert and eject UMDs from the pause screen
While the XMB is running, the pause screen offers "Insert UMD" with the drive empty, opening the Switch UMD game picker, and "Eject UMD" with a disc in. The XMB notices the change through its drive callback, as it does over the debugger's game.umd.insert/eject. Games keep "Switch UMD". Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
71974b2eab
commit
7d2663bf73
6 files changed
+40
-3
No files matched your search
+13
-2
@@ -906,7 +906,7 @@ void UmdReplaceScreen::CreateViews() {
|
||||
rightColumnItems->Add(new Choice(mm->T("Load", "Load...")))->OnClick.Add([&](UI::EventParams &e) {
|
||||
auto mm = GetI18NCategory(I18NCat::MAINMENU);
|
||||
System_BrowseForFile(GetRequesterToken(), mm->T("Load"), BrowseFileType::BOOTABLE, [this](std::string_view value, int) {
|
||||
__UmdReplace(Path(value));
|
||||
UseDisc(Path(value));
|
||||
TriggerFinish(DR_OK);
|
||||
});
|
||||
});
|
||||
@@ -933,10 +933,21 @@ void UmdReplaceScreen::update() {
|
||||
}
|
||||
|
||||
void UmdReplaceScreen::OnGameSelected(UI::EventParams &e) {
|
||||
__UmdReplace(Path(e.s));
|
||||
UseDisc(Path(e.s));
|
||||
TriggerFinish(DR_OK);
|
||||
}
|
||||
|
||||
void UmdReplaceScreen::UseDisc(const Path &path) {
|
||||
if (!insert_) {
|
||||
__UmdReplace(path);
|
||||
return;
|
||||
}
|
||||
std::string error;
|
||||
if (!__UmdInsert(path, &error)) {
|
||||
g_OSD.Show(OSDType::MESSAGE_ERROR, error);
|
||||
}
|
||||
}
|
||||
|
||||
void UmdReplaceScreen::OnGameSettings(UI::EventParams &e) {
|
||||
screenManager()->push(new GameSettingsScreen(Path()));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user