mirror of
https://github.com/dborth/vbagx.git
synced 2025-02-21 12:47:11 +01:00
fix GBA games on GC
This commit is contained in:
parent
6c1c62f7a9
commit
947ca0582a
@ -294,6 +294,9 @@ int VMCPULoadROM(int method)
|
|||||||
|
|
||||||
GBAROMSize = 0;
|
GBAROMSize = 0;
|
||||||
|
|
||||||
|
if(!ChangeInterface(method, NOTSILENT))
|
||||||
|
return 0;
|
||||||
|
|
||||||
switch (method)
|
switch (method)
|
||||||
{
|
{
|
||||||
case METHOD_SD:
|
case METHOD_SD:
|
||||||
@ -311,17 +314,16 @@ int VMCPULoadROM(int method)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check filename length */
|
if(!MakeFilePath(filepath, FILE_ROM, method))
|
||||||
if ((strlen(currentdir)+1+strlen(filelist[selection].filename)) < MAXPATHLEN)
|
return false;
|
||||||
sprintf(filepath, "%s/%s",currentdir,filelist[selection].filename);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
WaitPrompt("Maximum filepath length reached!");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
romfile = fopen(filepath, "rb");
|
// add device to filepath
|
||||||
if ( romfile == NULL )
|
char fullpath[1024];
|
||||||
|
sprintf(fullpath, "%s%s", rootdir, filepath);
|
||||||
|
|
||||||
|
romfile = fopen(fullpath, "rb");
|
||||||
|
|
||||||
|
if (romfile == NULL)
|
||||||
{
|
{
|
||||||
WaitPrompt("Error opening file!");
|
WaitPrompt("Error opening file!");
|
||||||
VMClose();
|
VMClose();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user