Fixed command line loading of roms.

This commit is contained in:
teuf
2001-04-28 17:17:17 +00:00
parent a6c411853c
commit 89169c29c8
6 changed files with 75 additions and 10 deletions

View File

@@ -256,6 +256,11 @@ DWORD ZFileMKDir()
#endif
}
extern char SRAMDir;
extern char InitDir;
extern char LoadDir;
DWORD ZFileCHDir()
{
return(chdir(CHPath));
@@ -443,9 +448,6 @@ DWORD GetDate()
#ifdef __LINUX__
extern char SRAMDir;
extern char InitDir;
extern char LoadDir;
void obtaindir()
{
@@ -467,7 +469,8 @@ void obtaindir()
} else {
closedir(tmp);
}
strcpy(&InitDir, cfgdir);
// strcpy(&InitDir, cfgdir);
// getcwd(&InitDir, 128);
if (SRAMDir == 0){
strcpy(&SRAMDir, cfgdir);
}
@@ -476,4 +479,29 @@ void obtaindir()
getcwd(&LoadDir, 128);
}
}
extern char fnamest, fnames;
void GetFilename()
{
char *tmp = &fnamest;
char size;
*tmp = '/';
while (*tmp!=0) tmp++;
while (*tmp!='/') tmp--;
size = (strlen(tmp)-1) & 0xFF;
strcpy(&fnamest, tmp);
fnamest = size;
tmp = &fnames;
*tmp = '/';
while (*tmp!=0) tmp++;
while (*tmp!='/') tmp--;
size = (strlen(tmp)-1) & 0xFF;
strcpy(&fnames, tmp);
fnames = size;
}
#endif