mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-17 04:39:34 +00:00
Handle the weird Chinese translation patchers in a nicer way.
Takes care of #5458, too.
This commit is contained in:
parent
fc9b057d88
commit
3d45c9dbed
@ -103,6 +103,31 @@ void InitMemoryForGameISO(std::string fileToStart) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Chinese translators like to rename EBOOT.BIN and replace it with some kind of stub
|
||||
// that probably loads a plugin and then launches the actual game. These stubs don't work in PPSSPP.
|
||||
// No idea why they are doing this, but it works to just bypass it. They could stop
|
||||
// inventing new filenames though...
|
||||
static const char *altBootNames[] = {
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.OLD",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.OLD",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.DAT",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.BI",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.LLD",
|
||||
"disc0:/PSP_GAME/SYSDIR/OLD_EBOOT.BIN",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.123",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT_LRC_CH.BIN",
|
||||
"disc0:/PSP_GAME/SYSDIR/BOOT0.OLD",
|
||||
"disc0:/PSP_GAME/SYSDIR/BOOT1.OLD",
|
||||
"disc0:/PSP_GAME/SYSDIR/BINOT.BIN",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.FRY",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.Z.Y",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.LEI",
|
||||
"disc0:/PSP_GAME/SYSDIR/EBOOT.DNR",
|
||||
"disc0:/PSP_GAME/SYSDIR/DBZ2.BIN",
|
||||
"disc0:/PSP_GAME/SYSDIR/PAKFILE2.BIN",
|
||||
};
|
||||
|
||||
bool Load_PSP_ISO(const char *filename, std::string *error_string)
|
||||
{
|
||||
// Mounting stuff relocated to InitMemoryForGameISO due to HD Remaster restructuring of code.
|
||||
@ -124,53 +149,13 @@ bool Load_PSP_ISO(const char *filename, std::string *error_string)
|
||||
|
||||
|
||||
std::string bootpath("disc0:/PSP_GAME/SYSDIR/EBOOT.BIN");
|
||||
// bypass patchers
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT.OLD").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.OLD";
|
||||
}
|
||||
// bypass another patchers
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT.DAT").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.DAT";
|
||||
}
|
||||
// bypass more patchers
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT.BI").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.BI";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT.LLD").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.LLD";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/OLD_EBOOT.BIN").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/OLD_EBOOT.BIN";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT.123").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.123";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT_LRC_CH.BIN").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT_LRC_CH.BIN";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/BOOT0.OLD").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/BOOT0.OLD";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/BOOT1.OLD").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/BOOT1.OLD";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/BINOT.BIN").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/BINOT.BIN";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT.FRY").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.FRY";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT.Z.Y").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.Z.Y";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT.LEI").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.LEI";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/EBOOT.DNR").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.DNR";
|
||||
}
|
||||
if (pspFileSystem.GetFileInfo("disc0:/PSP_GAME/SYSDIR/DBZ2.BIN").exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/DBZ2.BIN";
|
||||
|
||||
// Bypass Chinese translation patches, see comment above.
|
||||
for (int i = 0; i < ARRAY_SIZE(altBootNames); i++) {
|
||||
if (pspFileSystem.GetFileInfo(altBootNames[i]).exists) {
|
||||
bootpath = "disc0:/PSP_GAME/SYSDIR/EBOOT.OLD";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool hasEncrypted = false;
|
||||
|
2
native
2
native
@ -1 +1 @@
|
||||
Subproject commit 36a9bafcaf90b962480c1ce12155f313ba101cc9
|
||||
Subproject commit a8b07772772f1278a92426a6ab8d00a23705102b
|
Loading…
x
Reference in New Issue
Block a user