mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
UI work for VSH (Windows and ImGui)
This commit is contained in:
1 parent
9de3eb1244
commit
e9cdb2b20f
9 files changed
+19
-2
No files matched your search
@@ -456,6 +456,8 @@ GameRegion DetectGameRegionFromID(std::string_view id_full) {
|
||||
return GameRegion::TEST;
|
||||
} else if (id_letters == "UMDT") {
|
||||
return GameRegion::DIAGNOSTIC;
|
||||
} else if (id_letters == "VSHM") { // this is just generated from vshmain.elf
|
||||
return GameRegion::FIRMWARE;
|
||||
}
|
||||
}
|
||||
return GameRegion::HOMEBREW;
|
||||
@@ -474,6 +476,7 @@ std::string_view GameRegionToString(GameRegion region) {
|
||||
case GameRegion::TEST: return "Test disc";
|
||||
case GameRegion::DIAGNOSTIC: return "Diagnostic tool";
|
||||
case GameRegion::FIRMWARE: return "Firmware update";
|
||||
case GameRegion::VSH: return "VSH";
|
||||
default: return "unknown region";
|
||||
}
|
||||
}
|
||||
@@ -117,6 +117,7 @@ enum class GameRegion {
|
||||
TEST,
|
||||
DIAGNOSTIC,
|
||||
FIRMWARE,
|
||||
VSH,
|
||||
};
|
||||
|
||||
GameRegion DetectGameRegionFromID(std::string_view id_version);
|
||||
|
||||
@@ -131,6 +131,9 @@ void RecentFilesManager::Add(std::string_view filename) {
|
||||
}
|
||||
|
||||
// Some things should not be added to recent, such as the VSH (which will have a separate UI for launching it)
|
||||
if (endsWithNoCase(filename, "vshmain.prx")) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> guard(cmdLock_);
|
||||
cmds_.push(RecentCommand{ RecentCmd::Add, {}, std::make_unique<std::string>(filename) });
|
||||
|
||||
@@ -692,7 +692,7 @@ handleELF:
|
||||
if (flags_ & GameInfoFlags::PARAM_SFO) {
|
||||
info_->id = g_paramSFO.GenerateFakeID(gamePath_);
|
||||
info_->id_version = info_->id + "_1.00";
|
||||
info_->region = GameRegion::HOMEBREW; // Homebrew
|
||||
info_->region = equals(info_->title, "vshmain.prx") ? GameRegion::VSH : GameRegion::HOMEBREW;
|
||||
}
|
||||
|
||||
if (flags_ & GameInfoFlags::ICON) {
|
||||
|
||||
@@ -2473,6 +2473,9 @@ void ImDebugger::Frame(MIPSDebugInterface *mipsDebug, GPUCommon *gpuDebug, Draw:
|
||||
System_PostUIMessage(UIMessage::REQUEST_GAME_BOOT, path.ToString());
|
||||
});
|
||||
}
|
||||
if (ImGui::MenuItem("Load XMB (VSH)")) {
|
||||
System_PostUIMessage(UIMessage::REQUEST_GAME_BOOT, (g_Config.nandRootDirectory / "flash0/vsh/module/vshmain.prx").ToString());
|
||||
}
|
||||
if (ImGui::MenuItem("Open directory...")) {
|
||||
System_BrowseForFolder(reqToken_, "Load", Path(), [](std::string_view value, int) {
|
||||
System_PostUIMessage(UIMessage::REQUEST_GAME_BOOT, value);
|
||||
|
||||
+1
-1
@@ -695,7 +695,7 @@ void NativeInit(int argc, const char *argv[], const CommandLineOptions &cmdLineO
|
||||
cmdLineOptions.ApplyToConfig();
|
||||
|
||||
boot_filename.clear();
|
||||
if (boot_filename.empty() && cmdLineOptions.bootVSH.has_value() && cmdLineOptions.bootVSH.value()) {
|
||||
if (boot_filename.empty() && cmdLineOptions.bootVSH.value_or(false)) {
|
||||
boot_filename = g_Config.nandRootDirectory / "flash0/vsh/module/vshmain.prx";
|
||||
}
|
||||
|
||||
|
||||
@@ -471,6 +471,10 @@ namespace MainWindow {
|
||||
BrowseAndBoot(NON_EPHEMERAL_TOKEN, GetSysDirectory(DIRECTORY_GAME).ToString());
|
||||
break;
|
||||
|
||||
case ID_FILE_LOAD_VSH:
|
||||
System_PostUIMessage(UIMessage::REQUEST_GAME_BOOT, (g_Config.nandRootDirectory / "flash0/vsh/module/vshmain.prx").ToString());
|
||||
break;
|
||||
|
||||
case ID_FILE_OPEN_NEW_INSTANCE:
|
||||
W32Util::SpawnNewInstance(false);
|
||||
break;
|
||||
|
||||
@@ -512,6 +512,8 @@ BEGIN
|
||||
MENUITEM "", 0, MFT_SEPARATOR
|
||||
MENUITEM "Open New Instance", ID_FILE_OPEN_NEW_INSTANCE
|
||||
MENUITEM "", 0, MFT_SEPARATOR
|
||||
MENUITEM "Load XMB (VSH)", ID_FILE_LOAD_VSH
|
||||
MENUITEM "", 0, MFT_SEPARATOR
|
||||
|
||||
POPUP "Savestate Slot", ID_FILE_SAVESTATE_SLOT_MENU
|
||||
BEGIN
|
||||
|
||||
@@ -170,6 +170,7 @@
|
||||
#define ID_FILE_QUICKLOADSTATE_HC 40037
|
||||
#define ID_OPTIONS_CONTROLS 40038
|
||||
#define ID_DEBUG_BREAKONLOAD 40039
|
||||
#define ID_FILE_LOAD_VSH 40040
|
||||
#define ID_OPTIONS_FRAMESKIP 40044
|
||||
#define IDC_MEMCHECK 40045
|
||||
#define ID_FILE_MEMSTICK 40046
|
||||
|
||||
Reference in new issue
Block a user