X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fcommon%2Femu.c;h=9535bfd236561992f6192fccf5fbda8b8215af3b;hb=88fd63ad10faa746ef9d7ad7d98a72e51fe2aa86;hp=6a8c940b22726e2a2cfb8df81fb1025a52f5bba4;hpb=e64886365da9e882b54e06ab683ee4db60171e32;p=picodrive.git diff --git a/platform/common/emu.c b/platform/common/emu.c index 6a8c940..9535bfd 100644 --- a/platform/common/emu.c +++ b/platform/common/emu.c @@ -889,7 +889,7 @@ int emu_save_load_game(int load, int sram) { if (PicoOpt & POPT_EN_MCD_RAMCART) { sram_size = 0x12000; - sram_data = SRam.data; + sram_data = Pico.sv.data; if (sram_data) memcpy32((int *)sram_data, (int *)Pico_mcd->bram, 0x2000/4); } else { @@ -898,11 +898,11 @@ int emu_save_load_game(int load, int sram) truncate = 0; // the .brm may contain RAM cart data after normal brm } } else { - sram_size = SRam.size; - sram_data = SRam.data; + sram_size = Pico.sv.size; + sram_data = Pico.sv.data; } if (sram_data == NULL) - return 0; // SRam forcefully disabled for this game + return 0; // cart saves forcefully disabled for this game if (load) { @@ -1262,9 +1262,9 @@ void emu_init(void) void emu_finish(void) { // save SRAM - if ((currentConfig.EmuOpt & EOPT_EN_SRAM) && SRam.changed) { + if ((currentConfig.EmuOpt & EOPT_EN_SRAM) && Pico.sv.changed) { emu_save_load_game(0, 1); - SRam.changed = 0; + Pico.sv.changed = 0; } if (!(currentConfig.EmuOpt & EOPT_NO_AUTOSVCFG)) { @@ -1514,10 +1514,10 @@ void emu_loop(void) emu_set_fastforward(0); // save SRAM - if ((currentConfig.EmuOpt & EOPT_EN_SRAM) && SRam.changed) { + if ((currentConfig.EmuOpt & EOPT_EN_SRAM) && Pico.sv.changed) { plat_status_msg_busy_first("Writing SRAM/BRAM..."); emu_save_load_game(0, 1); - SRam.changed = 0; + Pico.sv.changed = 0; } pemu_loop_end();