Avoid crashing on PSX EBOOTs renamed to ISO (people try strange things...)

This commit is contained in:
Henrik Rydgård 2024-10-25 15:19:44 +02:00
parent 7d24fca4e2
commit bd8905aa44
3 changed files with 13 additions and 1 deletions

View file

@ -395,6 +395,17 @@ NPDRMDemoBlockDevice::NPDRMDemoBlockDevice(FileLoader *fileLoader)
ERROR_LOG(Log::Loader, "Invalid NPUMDIMG header!");
}
u32 psar_id;
fileLoader->ReadAt(psarOffset, 4, 1, &psar_id);
INFO_LOG(Log::Loader, "NPDRM: PSAR ID: %08x");
// PS1 PSAR begins with "PSISOIMG0000"
if (psar_id == 'SISP') {
lbaSize_ = 0; // Mark invalid
ERROR_LOG(Log::Loader, "PSX not supported! Should have been caught earlier.");
return;
}
kirk_init();
// getkey

View file

@ -1072,6 +1072,7 @@ UI::EventReturn GameBrowser::GridSettingsClick(UI::EventParams &e) {
}
UI::EventReturn GameBrowser::OnRecentClear(UI::EventParams &e) {
_assert_(screenManager_);
screenManager_->RecreateAllViews();
System_Notify(SystemNotification::UI);
return UI::EVENT_DONE;

View file

@ -121,7 +121,7 @@ static double g_lastActivity = 0.0;
static double g_lastKeepAwake = 0.0;
// Time until we stop considering the core active without user input.
// Should this be configurable? 2 hours currently.
static const double ACTIVITY_IDLE_TIMEOUT = 2.0 * 3600.0;
static constexpr double ACTIVITY_IDLE_TIMEOUT = 2.0 * 3600.0;
void System_LaunchUrl(LaunchUrlType urlType, const char *url) {
ShellExecute(NULL, L"open", ConvertUTF8ToWString(url).c_str(), NULL, NULL, SW_SHOWNORMAL);