diff --git a/gp2x/emu.c b/gp2x/emu.c index 56c83ff..24496fd 100644 --- a/gp2x/emu.c +++ b/gp2x/emu.c @@ -764,6 +764,12 @@ static int check_save_file(void) return 0; } +static void emu_state_cb(const char *str) +{ + clearArea(0); + blit("", str); +} + static void RunEvents(unsigned int which) { if(which & 0x1800) { // save or load (but not both) @@ -778,7 +784,10 @@ static void RunEvents(unsigned int which) } if (do_it) { osd_text(4, 232, (which & 0x1000) ? "LOADING GAME" : "SAVING GAME"); + PicoStateProgressCB = emu_state_cb; + gp2x_memcpy_all_buffers(gp2x_screen, 0, 320*240*2); emu_SaveLoadGame((which & 0x1000) >> 12, 0); + PicoStateProgressCB = NULL; } reset_timing = 1; @@ -1263,20 +1272,11 @@ size_t gzWrite2(void *p, size_t _size, size_t _n, void *file) } -static void emu_state_cb(const char *str) -{ - clearArea(0); - blit("", str); -} - int emu_SaveLoadGame(int load, int sram) { int ret = 0; char saveFname[512]; - PicoStateProgressCB = emu_state_cb; - gp2x_memcpy_all_buffers(gp2x_screen, 0, 320*240*2); - // make save filename romfname_ext(saveFname, ""); if(sram) strcat(saveFname, (PicoMCD&1) ? ".brm" : ".srm"); diff --git a/gp2x/version.h b/gp2x/version.h index a4d411f..0645b77 100644 --- a/gp2x/version.h +++ b/gp2x/version.h @@ -1,2 +1,2 @@ -#define VERSION "1.14" +#define VERSION "1.15"