Allow using a file browser to choose UMDs during disc change.

This commit is contained in:
Henrik Rydgård committed 2023-09-04 21:43:10 +02:00
1 parent 6d449139bf
commit 67cb466ee1
5 files changed
+29 -18

No files matched your search

+12
View File
@@ -1616,7 +1616,19 @@ void UmdReplaceScreen::CreateViews() {
tabAllGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected);
if (System_GetPropertyBool(SYSPROP_HAS_FILE_BROWSER)) {
rightColumnItems->Add(new Choice(mm->T("Load", "Load...")))->OnClick.Add([&](UI::EventParams &e) {
auto mm = GetI18NCategory(I18NCat::MAINMENU);
System_BrowseForFile(mm->T("Load"), BrowseFileType::BOOTABLE, [&](const std::string &value, int) {
__UmdReplace(Path(value));
TriggerFinish(DR_OK);
});
return EVENT_DONE;
});
}
rightColumnItems->Add(new Choice(di->T("Cancel")))->OnClick.Handle<UIScreen>(this, &UIScreen::OnCancel);
rightColumnItems->Add(new Spacer());
rightColumnItems->Add(new Choice(mm->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings);
if (g_Config.HasRecentIsos()) {