X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fmisc.c;h=7353c3b66eee16b7d0b3332462c3c9144854c3ac;hp=d743b34b706575fef5935404435423c8a4aaf0a5;hb=cbbab9cd861a35ecc38546d7291c3cc655b4f5ed;hpb=52082bc1e755206eb1c9865153fdc733cbc12941 diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index d743b34b..7353c3b6 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -333,7 +333,7 @@ int CheckCdrom() { } if (Config.PsxAuto) { // autodetect system (pal or ntsc) - if (strstr(exename, "ES") != NULL) + if (CdromId[2] == 'e' || CdromId[2] == 'E') Config.PsxType = PSX_TYPE_PAL; // pal else Config.PsxType = PSX_TYPE_NTSC; // ntsc } @@ -458,7 +458,7 @@ static const char PcsxHeader[32] = "STv4 PCSX v" PACKAGE_VERSION; // Savestate Versioning! // If you make changes to the savestate version, please increment the value below. -static const u32 SaveVersion = 0x8b410005; +static const u32 SaveVersion = 0x8b410006; int SaveState(const char *file) { gzFile f; @@ -534,10 +534,14 @@ int LoadState(const char *file) { gzread(f, &version, sizeof(u32)); gzread(f, &hle, sizeof(boolean)); - if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion || hle != Config.HLE) { + if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion) { gzclose(f); return -1; } + Config.HLE = hle; + + if (Config.HLE) + psxBiosInit(); psxCpu->Reset(); gzseek(f, 128 * 96 * 3, SEEK_CUR); @@ -590,7 +594,7 @@ int CheckState(const char *file) { gzclose(f); - if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion || hle != Config.HLE) + if (strncmp("STv4 PCSX", header, 9) != 0 || version != SaveVersion) return -1; return 0;