From cd40856914f3e03c3f92efa5b99b3ae9dad9ab92 Mon Sep 17 00:00:00 2001 From: The Dax Date: Sun, 1 Sep 2013 13:25:42 -0400 Subject: [PATCH] Do some additional checks on what kind of eboot it is before trying to boot it. --- Core/Loaders.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Core/Loaders.cpp b/Core/Loaders.cpp index d3e0ed778..b85789fa5 100644 --- a/Core/Loaders.cpp +++ b/Core/Loaders.cpp @@ -162,6 +162,13 @@ bool LoadFile(std::string &filename, std::string *error_string) { if (fileInfo.exists) { INFO_LOG(LOADER, "File is a PBP in a directory!"); + std::string ebootPath = filename + "/EBOOT.PBP"; + IdentifiedFileType ebootType = Identify_File(ebootPath); + if(ebootType == FILETYPE_PSP_ISO_NP) { + InitMemoryForGameISO(ebootPath); + pspFileSystem.SetStartingDirectory("disc0:/PSP_GAME/USRDIR"); + return Load_PSP_ISO(filename.c_str(), error_string); + } std::string path = filename; size_t pos = path.find("/PSP/GAME/"); if (pos != std::string::npos) @@ -213,6 +220,7 @@ bool LoadFile(std::string &filename, std::string *error_string) { case FILETYPE_NORMAL_DIRECTORY: ERROR_LOG(LOADER, "Just a directory."); + *error_string = "Just a directory."; break; case FILETYPE_UNKNOWN_BIN: