\r
static void draw_menu_credits(void)\r
{\r
- char vstr[16];\r
+ char vstr[32];\r
\r
//int tl_x = 15, tl_y = 70;\r
gp2x_fceu_copy_bg();\r
gp2x_text_out15(20, 40, "(c) notaz, 2007");\r
\r
gp2x_text_out15(20, 70, "Based on FCE Ultra versions");\r
- gp2x_text_out15(20, 80, "0.81 and 0.98.15");\r
+ gp2x_text_out15(20, 80, "0.81 and 0.98.1x");\r
\r
gp2x_text_out15(20, 110, " - Credits - ");\r
gp2x_text_out15(20, 130, "Bero: FCE");\r
\r
// since we are using the mmu hack, we must flush the cache first\r
// (the params are most likely wrong, but they seem to work somehow)\r
- flushcache(addr, addr + 320*240*2, 0);\r
+ //flushcache(addr, addr + 320*240*2, 0);\r
+ flushcache(gp2x_screen, (char *)gp2x_screen + 320*240*2, 0);\r
\r
lsw = (unsigned short) addr;\r
msw = (unsigned short)(addr >> 16);\r
SDL_QuitSubSystem(SDL_INIT_VIDEO);
SDL_Quit();
+ free(gp2x_screen);
if (sounddev > 0) close(sounddev);
gp2x_usbjoy_deinit();
}
int x;\r
char *fn;\r
\r
- if(!DiskWritten) return;\r
-\r
- fn=FCEU_MakeFName(FCEUMKF_FDS,0,0);\r
-\r
- if(!(fp=FCEUD_UTF8fopen(fn,"wb")))\r
+ if(!DiskWritten)\r
{\r
- free(fn);\r
- return;\r
- }\r
- free(fn);\r
+ fn=FCEU_MakeFName(FCEUMKF_FDS,0,0);\r
\r
- for(x=0;x<TotalSides;x++)\r
- {\r
- if(fwrite(diskdata[x],1,65500,fp)!=65500)\r
+ if(!(fp=FCEUD_UTF8fopen(fn,"wb")))\r
{\r
- FCEU_PrintError("Error saving FDS image!");\r
- fclose(fp);\r
+ free(fn);\r
return;\r
}\r
- }\r
- FreeFDSMemory();\r
- fclose(fp);\r
+ free(fn);\r
+\r
+ for(x=0;x<TotalSides;x++)\r
+ {\r
+ if(fwrite(diskdata[x],1,65500,fp)!=65500)\r
+ {\r
+ FCEU_PrintError("Error saving FDS image!");\r
+ fclose(fp);\r
+ return;\r
+ }\r
+ }\r
+ fclose(fp);\r
#ifdef GP2X\r
- sync();\r
+ sync();\r
#endif\r
+ }\r
+\r
+ FreeFDSMemory();\r
+ for(x=0;x<TotalSides;x++)\r
+ if(diskdatao[x])\r
+ {\r
+ free(diskdatao[x]);\r
+ diskdatao[x]=0;\r
+ }\r
+ ResetExState(0,0);\r
}\r
\r
asprintf(&ret,"%s"PSS"%s.%s",odirs[FCEUIOD_NV],FileBase,cd1);
else
asprintf(&ret,"%s"PSS"sav"PSS"%s.%s",BaseDirectory,FileBase,cd1);
- if(stat(ret,&tmpstat)==-1)
- {
- if(odirs[FCEUIOD_NV])
- asprintf(&ret,"%s"PSS"%s.%s",odirs[FCEUIOD_NV],FileBase,cd1);
- else
- asprintf(&ret,"%s"PSS"sav"PSS"%s.%s",BaseDirectory,FileBase,cd1);
- }
break;
case FCEUMKF_CHEAT:
if(odirs[FCEUIOD_CHEATS])
if(VROM) {free(VROM);VROM=0;}\r
if(MapClose) MapClose();\r
if(trainerpoo) {FCEU_gfree(trainerpoo);trainerpoo=0;}\r
+ ResetExState(0,0);\r
}\r
break;\r
case GI_INFOSTRING:\r
if(UNIFCart.Close)\r
UNIFCart.Close();\r
FreeUNIF();\r
+ ResetExState(0,0);\r
break;\r
case GI_INFOSTRING:\r
{\r