mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Avoid crashing on PSX EBOOTs renamed to ISO (people try strange things...)
This commit is contained in:
parent
7d24fca4e2
commit
bd8905aa44
3 changed files with 13 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue