if (ret != 0)
return 0;
- if (load)
+ if (load) {
ret = LoadState(fname);
+
+ // reflect hle/bios mode from savestate
+ if (Config.HLE)
+ bios_sel = 0;
+ else if (bios_sel == 0 && bioses[1] != NULL)
+ // XXX: maybe find the right bios instead
+ bios_sel = 1;
+ }
else
ret = SaveState(fname);
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);
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;