fix zip loading

This commit is contained in:
dborth 2008-10-02 05:28:01 +00:00
parent 12ee10d3f4
commit 29e6ef31e5
4 changed files with 6 additions and 6 deletions

View File

@ -78,7 +78,7 @@ int main(int argc, char *argv[])
#endif #endif
// allocate memory to store rom // allocate memory to store rom
nesrom = (unsigned char *)malloc(1024*1024*3); // 3 MB should be plenty nesrom = (unsigned char *)malloc(1024*1024*2); // 2 MB should be plenty
/*** Minimal Emulation Loop ***/ /*** Minimal Emulation Loop ***/
if ( !FCEUI_Initialize() ) { if ( !FCEUI_Initialize() ) {

View File

@ -72,7 +72,7 @@ extern int UNIFLoad(const char *name, FCEUFILE *fp);
extern int NSFLoad(FCEUFILE *fp); extern int NSFLoad(FCEUFILE *fp);
extern uint8 FDSBIOS[8192]; extern uint8 FDSBIOS[8192];
int GCMemROM(method) int GCMemROM(int method, int size)
{ {
ResetGameLoaded(); ResetGameLoaded();
@ -99,7 +99,7 @@ int GCMemROM(method)
InitialisePads(); InitialisePads();
MakeFCEUFile((char *)nesrom, filelist[selection].length); MakeFCEUFile((char *)nesrom, size);
nesGameType = 0; nesGameType = 0;

View File

@ -9,4 +9,4 @@
* NES Memory Load Game * NES Memory Load Game
****************************************************************************/ ****************************************************************************/
int GCMemROM(int method); int GCMemROM(int method, int size);

View File

@ -300,7 +300,7 @@ int FileSelector (int method)
StripExt(romFilename, filelist[selection].filename); StripExt(romFilename, filelist[selection].filename);
ShowAction ((char *)"Loading..."); ShowAction ((char *)"Loading...");
int size = 0; int size = 0;
switch (method) switch (method)
@ -323,7 +323,7 @@ int FileSelector (int method)
if (size > 0) if (size > 0)
{ {
if(GCMemROM(method) > 0) if(GCMemROM(method, size) > 0)
return 1; return 1;
else else
return 0; return 0;