mirror of
https://github.com/dborth/fceugx.git
synced 2025-01-07 14:28:18 +01:00
bugfixes
This commit is contained in:
parent
fe62042ca8
commit
4edbac1b93
@ -122,7 +122,7 @@ SetupCheats()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
char filepath[1024];
|
char filepath[1024];
|
||||||
int offset = 0;
|
size_t offset = 0;
|
||||||
|
|
||||||
int device = GCSettings.SaveMethod;
|
int device = GCSettings.SaveMethod;
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ void OpenGameGenie()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int romSize = 0;
|
size_t romSize = 0;
|
||||||
char * tmpbuffer = (char *) memalign(32, 512 * 1024);
|
char * tmpbuffer = (char *) memalign(32, 512 * 1024);
|
||||||
if(!tmpbuffer)
|
if(!tmpbuffer)
|
||||||
return;
|
return;
|
||||||
|
@ -32,6 +32,8 @@ bool romLoaded = false;
|
|||||||
|
|
||||||
int GCMemROM(int size)
|
int GCMemROM(int size)
|
||||||
{
|
{
|
||||||
|
bool biosError = false;
|
||||||
|
|
||||||
ResetGameLoaded();
|
ResetGameLoaded();
|
||||||
|
|
||||||
CloseGame();
|
CloseGame();
|
||||||
@ -89,7 +91,7 @@ int GCMemROM(int size)
|
|||||||
// read FDS BIOS into FDSBIOS - should be 8192 bytes
|
// read FDS BIOS into FDSBIOS - should be 8192 bytes
|
||||||
if (FDSBIOS[1] == 0)
|
if (FDSBIOS[1] == 0)
|
||||||
{
|
{
|
||||||
int biosSize = 0;
|
size_t biosSize = 0;
|
||||||
char * tmpbuffer = (char *) memalign(32, 64 * 1024);
|
char * tmpbuffer = (char *) memalign(32, 64 * 1024);
|
||||||
|
|
||||||
char filepath[1024];
|
char filepath[1024];
|
||||||
@ -105,6 +107,8 @@ int GCMemROM(int size)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
biosError = true;
|
||||||
|
|
||||||
if (biosSize > 0)
|
if (biosSize > 0)
|
||||||
ErrorPrompt("FDS BIOS file is invalid!");
|
ErrorPrompt("FDS BIOS file is invalid!");
|
||||||
else
|
else
|
||||||
@ -148,7 +152,8 @@ int GCMemROM(int size)
|
|||||||
delete GameInfo;
|
delete GameInfo;
|
||||||
GameInfo = 0;
|
GameInfo = 0;
|
||||||
|
|
||||||
ErrorPrompt("Invalid game file!");
|
if(!biosError)
|
||||||
|
ErrorPrompt("Invalid game file!");
|
||||||
romLoaded = false;
|
romLoaded = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -267,14 +267,14 @@ bool MakeFilePath(char filepath[], int type, char * filename, int filenum)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(GCSettings.SaveMethod == DEVICE_AUTO)
|
||||||
|
GCSettings.SaveMethod = autoSaveMethod(SILENT);
|
||||||
|
|
||||||
|
if(GCSettings.SaveMethod == DEVICE_AUTO)
|
||||||
|
return false;
|
||||||
|
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
if(GCSettings.SaveMethod == DEVICE_AUTO)
|
|
||||||
GCSettings.SaveMethod = autoSaveMethod(SILENT);
|
|
||||||
|
|
||||||
if(GCSettings.SaveMethod == DEVICE_AUTO)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
case FILE_RAM:
|
case FILE_RAM:
|
||||||
case FILE_STATE:
|
case FILE_STATE:
|
||||||
sprintf(folder, GCSettings.SaveFolder);
|
sprintf(folder, GCSettings.SaveFolder);
|
||||||
|
Loading…
Reference in New Issue
Block a user