From 3e3e9b761fdf7bec7d8482f709dc39357be88720 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 9 Jan 2013 00:46:47 -0800 Subject: [PATCH] Fix it so headless can actually mount isos. --- Core/PSPLoaders.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Core/PSPLoaders.cpp b/Core/PSPLoaders.cpp index 7915b80d66..db8233343b 100644 --- a/Core/PSPLoaders.cpp +++ b/Core/PSPLoaders.cpp @@ -62,7 +62,7 @@ bool Load_PSP_ISO(const char *filename, std::string *error_string) //pspFileSystem.Mount("host0:",umd2); pspFileSystem.Mount("umd0:", umd2); pspFileSystem.Mount("umd1:", umd2); - pspFileSystem.Mount("disc0:", umd2); + pspFileSystem.Mount("disc0:", umd2); pspFileSystem.Mount("umd:", umd2); pspFileSystem.Mount("UMD0:", umd2); pspFileSystem.Mount("UMD1:", umd2); @@ -116,6 +116,19 @@ bool Load_PSP_ISO(const char *filename, std::string *error_string) bool Load_PSP_ELF_PBP(const char *filename, std::string *error_string) { + // This is really just for headless, might need tweaking later. + if (!PSP_CoreParameter().mountIso.empty()) + { + ISOFileSystem *umd2 = new ISOFileSystem(&pspFileSystem, constructBlockDevice(PSP_CoreParameter().mountIso.c_str())); + + pspFileSystem.Mount("umd1:", umd2); + pspFileSystem.Mount("disc0:", umd2); + pspFileSystem.Mount("umd:", umd2); + pspFileSystem.Mount("UMD1:", umd2); + pspFileSystem.Mount("DISC0:", umd2); + pspFileSystem.Mount("UMD:", umd2); + } + std::string full_path = filename; std::string path, file, extension; SplitPath(ReplaceAll(full_path, "\\", "/"), &path, &file, &extension);