X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fstate.c;h=f4e685fb05e3946938e88e619c554fd71ac53049;hb=e42a47e2086e6512519dd86af420363498302f49;hp=089957eb5708e1c9a3e1faeccbc759216ea7d6ce;hpb=274fcc35aa20e9777a8e09630a94088757384329;p=picodrive.git diff --git a/pico/state.c b/pico/state.c index 089957e..f4e685f 100644 --- a/pico/state.c +++ b/pico/state.c @@ -7,7 +7,7 @@ */ #include "pico_int.h" -#include +#include #include "../cpu/sh2/sh2.h" #include "sound/ym2612.h" @@ -589,6 +589,9 @@ readend: if (PicoAHW & PAHW_32X) Pico32xStateLoaded(1); + if (PicoLoadStateHook != NULL) + PicoLoadStateHook(); + // must unpack 68k and z80 after banks are set up if (!(PicoAHW & PAHW_SMS)) SekUnpackCpu(buff_m68k, 0); @@ -683,9 +686,8 @@ static int pico_state_internal(void *afile, int is_save) ret = state_load_legacy(afile); } - if (PicoLoadStateHook != NULL) - PicoLoadStateHook(); Pico.m.dirtyPal = 1; + Pico.video.status &= ~(SR_VB | SR_F); } return ret;