return 0;\r
}\r
\r
+static void emu_state_cb(const char *str)\r
+{\r
+ clearArea(0);\r
+ blit("", str);\r
+}\r
+\r
static void RunEvents(unsigned int which)\r
{\r
if(which & 0x1800) { // save or load (but not both)\r
}\r
if (do_it) {\r
osd_text(4, 232, (which & 0x1000) ? "LOADING GAME" : "SAVING GAME");\r
+ PicoStateProgressCB = emu_state_cb;\r
+ gp2x_memcpy_all_buffers(gp2x_screen, 0, 320*240*2);\r
emu_SaveLoadGame((which & 0x1000) >> 12, 0);\r
+ PicoStateProgressCB = NULL;\r
}\r
\r
reset_timing = 1;\r
}\r
\r
\r
-static void emu_state_cb(const char *str)\r
-{\r
- clearArea(0);\r
- blit("", str);\r
-}\r
-\r
int emu_SaveLoadGame(int load, int sram)\r
{\r
int ret = 0;\r
char saveFname[512];\r
\r
- PicoStateProgressCB = emu_state_cb;\r
- gp2x_memcpy_all_buffers(gp2x_screen, 0, 320*240*2);\r
-\r
// make save filename\r
romfname_ext(saveFname, "");\r
if(sram) strcat(saveFname, (PicoMCD&1) ? ".brm" : ".srm");\r