diff --git a/source/ngc/cheatmgr.cpp b/source/ngc/cheatmgr.cpp index 8d33900..ea506f5 100644 --- a/source/ngc/cheatmgr.cpp +++ b/source/ngc/cheatmgr.cpp @@ -122,7 +122,7 @@ SetupCheats() return; char filepath[1024]; - int offset = 0; + size_t offset = 0; int device = GCSettings.SaveMethod; @@ -154,7 +154,7 @@ void OpenGameGenie() return; } - int romSize = 0; + size_t romSize = 0; char * tmpbuffer = (char *) memalign(32, 512 * 1024); if(!tmpbuffer) return; diff --git a/source/ngc/fceuload.cpp b/source/ngc/fceuload.cpp index c7ebb10..088e175 100644 --- a/source/ngc/fceuload.cpp +++ b/source/ngc/fceuload.cpp @@ -32,6 +32,8 @@ bool romLoaded = false; int GCMemROM(int size) { + bool biosError = false; + ResetGameLoaded(); CloseGame(); @@ -89,7 +91,7 @@ int GCMemROM(int size) // read FDS BIOS into FDSBIOS - should be 8192 bytes if (FDSBIOS[1] == 0) { - int biosSize = 0; + size_t biosSize = 0; char * tmpbuffer = (char *) memalign(32, 64 * 1024); char filepath[1024]; @@ -105,6 +107,8 @@ int GCMemROM(int size) } else { + biosError = true; + if (biosSize > 0) ErrorPrompt("FDS BIOS file is invalid!"); else @@ -148,7 +152,8 @@ int GCMemROM(int size) delete GameInfo; GameInfo = 0; - ErrorPrompt("Invalid game file!"); + if(!biosError) + ErrorPrompt("Invalid game file!"); romLoaded = false; return 0; } diff --git a/source/ngc/filebrowser.cpp b/source/ngc/filebrowser.cpp index fa13f81..a54c117 100644 --- a/source/ngc/filebrowser.cpp +++ b/source/ngc/filebrowser.cpp @@ -267,14 +267,14 @@ bool MakeFilePath(char filepath[], int type, char * filename, int filenum) } else { + if(GCSettings.SaveMethod == DEVICE_AUTO) + GCSettings.SaveMethod = autoSaveMethod(SILENT); + + if(GCSettings.SaveMethod == DEVICE_AUTO) + return false; + switch(type) { - if(GCSettings.SaveMethod == DEVICE_AUTO) - GCSettings.SaveMethod = autoSaveMethod(SILENT); - - if(GCSettings.SaveMethod == DEVICE_AUTO) - return false; - case FILE_RAM: case FILE_STATE: sprintf(folder, GCSettings.SaveFolder);