X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fmisc.c;h=d42576c836667c5bfabb1b46a1b62a32d05f12e8;hb=accedc82b01fe5834a805a9872405d51de1d5c06;hp=0b151a5a6a435e2c989303229baf82323182882d;hpb=3e42b1155e892eae2dcd0ee62d0645ef43b889a5;p=pcsx_rearmed.git diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 0b151a5a..d42576c8 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -357,6 +357,14 @@ int CheckCdrom() { return -1; } } + /* Workaround for Wild Arms EU/US which has non-standard string causing incorrect region detection */ + if (exename[0] == 'E' && exename[1] == 'X' && exename[2] == 'E' && exename[3] == '\\') { + size_t offset = 4; + size_t i, len = strlen(exename) - offset; + for (i = 0; i < len; i++) + exename[i] = exename[i + offset]; + exename[i] = '\0'; + } } else if (GetCdromFile(mdir, time, "PSX.EXE;1") != -1) { strcpy(exename, "PSX.EXE;1"); strcpy(CdromId, "SLUS99999"); @@ -384,7 +392,7 @@ int CheckCdrom() { } if (CdromLabel[0] == ' ') { - strncpy(CdromLabel, CdromId, 9); + memcpy(CdromLabel, CdromId, 9); } SysPrintf(_("CD-ROM Label: %.32s\n"), CdromLabel); SysPrintf(_("CD-ROM ID: %.9s\n"), CdromId); @@ -649,6 +657,11 @@ int LoadState(const char *file) { if (Config.HLE) psxBiosInit(); +#if defined(LIGHTREC) + if (Config.Cpu != CPU_INTERPRETER) + psxCpu->Clear(0, UINT32_MAX); //clear all + else +#endif psxCpu->Reset(); SaveFuncs.seek(f, 128 * 96 * 3, SEEK_CUR); @@ -742,7 +755,7 @@ int RecvPcsxInfo() { NET_recvData(&Config.Cpu, sizeof(Config.Cpu), PSE_NET_BLOCKING); if (tmp != Config.Cpu) { psxCpu->Shutdown(); -#ifdef PSXREC +#if defined(NEW_DYNAREC) || defined(LIGHTREC) if (Config.Cpu == CPU_INTERPRETER) psxCpu = &psxInt; else psxCpu = &psxRec; #else