Move PathInfo method definitions to .cpp file.
This commit is contained in:
parent
407b01b39d
commit
c9c6049892
|
@ -199,6 +199,204 @@ void PathInfo::init(const char *filename)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PathInfo::LoadModulePath()
|
||||||
|
{
|
||||||
|
#if defined(HOST_WINDOWS)
|
||||||
|
|
||||||
|
char *p;
|
||||||
|
ZeroMemory(pathToModule, sizeof(pathToModule));
|
||||||
|
|
||||||
|
GetModuleFileName(NULL, pathToModule, sizeof(pathToModule));
|
||||||
|
p = pathToModule + lstrlen(pathToModule);
|
||||||
|
while (p >= pathToModule && *p != DIRECTORY_DELIMITER_CHAR) p--;
|
||||||
|
if (++p >= pathToModule) *p = 0;
|
||||||
|
|
||||||
|
extern char* _hack_alternateModulePath;
|
||||||
|
if (_hack_alternateModulePath)
|
||||||
|
{
|
||||||
|
strcpy(pathToModule, _hack_alternateModulePath);
|
||||||
|
}
|
||||||
|
#elif defined(DESMUME_COCOA)
|
||||||
|
std::string pathStr = Path::GetFileDirectoryPath(path);
|
||||||
|
|
||||||
|
strncpy(pathToModule, pathStr.c_str(), MAX_PATH);
|
||||||
|
#else
|
||||||
|
char *cwd = g_build_filename(g_get_user_config_dir(), "desmume", NULL);
|
||||||
|
g_mkdir_with_parents(cwd, 0755);
|
||||||
|
strncpy(pathToModule, cwd, MAX_PATH);
|
||||||
|
g_free(cwd);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathInfo::GetDefaultPath(char *pathToDefault, const char *key, int maxCount)
|
||||||
|
{
|
||||||
|
#ifdef HOST_WINDOWS
|
||||||
|
std::string temp = (std::string)"." + DIRECTORY_DELIMITER_CHAR + pathToDefault;
|
||||||
|
strncpy(pathToDefault, temp.c_str(), maxCount);
|
||||||
|
#else
|
||||||
|
strncpy(pathToDefault, pathToModule, maxCount);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathInfo::ReadKey(char *pathToRead, const char *key)
|
||||||
|
{
|
||||||
|
#ifdef HOST_WINDOWS
|
||||||
|
GetPrivateProfileString(SECTION, key, key, pathToRead, MAX_PATH, IniName);
|
||||||
|
if (strcmp(pathToRead, key) == 0) {
|
||||||
|
//since the variables are all intialized in this file they all use MAX_PATH
|
||||||
|
GetDefaultPath(pathToRead, key, MAX_PATH);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
//since the variables are all intialized in this file they all use MAX_PATH
|
||||||
|
GetDefaultPath(pathToRead, key, MAX_PATH);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathInfo::ReadPathSettings()
|
||||||
|
{
|
||||||
|
if ((strcmp(pathToModule, "") == 0) || !pathToModule)
|
||||||
|
LoadModulePath();
|
||||||
|
|
||||||
|
ReadKey(pathToRoms, ROMKEY);
|
||||||
|
ReadKey(pathToBattery, BATTERYKEY);
|
||||||
|
ReadKey(pathToStates, STATEKEY);
|
||||||
|
ReadKey(pathToScreenshots, SCREENSHOTKEY);
|
||||||
|
ReadKey(pathToAviFiles, AVIKEY);
|
||||||
|
ReadKey(pathToCheats, CHEATKEY);
|
||||||
|
ReadKey(pathToSounds, SOUNDKEY);
|
||||||
|
ReadKey(pathToFirmware, FIRMWAREKEY);
|
||||||
|
ReadKey(pathToLua, LUAKEY);
|
||||||
|
ReadKey(pathToSlot1D, SLOT1DKEY);
|
||||||
|
#ifdef HOST_WINDOWS
|
||||||
|
GetPrivateProfileString(SECTION, FORMATKEY, "%f_%s_%r", screenshotFormat, MAX_FORMAT, IniName);
|
||||||
|
savelastromvisit = GetPrivateProfileBool(SECTION, LASTVISITKEY, true, IniName);
|
||||||
|
currentimageformat = (ImageFormat)GetPrivateProfileInt(SECTION, DEFAULTFORMATKEY, PNG, IniName);
|
||||||
|
r4Format = (R4Format)GetPrivateProfileInt(SECTION, R4FORMATKEY, R4_CHEAT_DAT, IniName);
|
||||||
|
if ((r4Format != R4_CHEAT_DAT) && (r4Format != R4_USRCHEAT_DAT))
|
||||||
|
{
|
||||||
|
r4Format = R4_USRCHEAT_DAT;
|
||||||
|
WritePrivateProfileInt(SECTION, R4FORMATKEY, r4Format, IniName);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
needsSaving = GetPrivateProfileInt(SECTION, NEEDSSAVINGKEY, TRUE, IniName);
|
||||||
|
if(needsSaving)
|
||||||
|
{
|
||||||
|
needsSaving = FALSE;
|
||||||
|
WritePathSettings();
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathInfo::SwitchPath(Action action, KnownPath path, char *buffer)
|
||||||
|
{
|
||||||
|
char *pathToCopy = 0;
|
||||||
|
switch (path)
|
||||||
|
{
|
||||||
|
case ROMS:
|
||||||
|
pathToCopy = pathToRoms;
|
||||||
|
break;
|
||||||
|
case BATTERY:
|
||||||
|
pathToCopy = pathToBattery;
|
||||||
|
break;
|
||||||
|
case STATES:
|
||||||
|
pathToCopy = pathToStates;
|
||||||
|
break;
|
||||||
|
case SCREENSHOTS:
|
||||||
|
pathToCopy = pathToScreenshots;
|
||||||
|
break;
|
||||||
|
case AVI_FILES:
|
||||||
|
pathToCopy = pathToAviFiles;
|
||||||
|
break;
|
||||||
|
case CHEATS:
|
||||||
|
pathToCopy = pathToCheats;
|
||||||
|
break;
|
||||||
|
case SOUNDS:
|
||||||
|
pathToCopy = pathToSounds;
|
||||||
|
break;
|
||||||
|
case FIRMWARE:
|
||||||
|
pathToCopy = pathToFirmware;
|
||||||
|
break;
|
||||||
|
case MODULE:
|
||||||
|
pathToCopy = pathToModule;
|
||||||
|
break;
|
||||||
|
case SLOT1D:
|
||||||
|
pathToCopy = pathToSlot1D;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (action == GET)
|
||||||
|
{
|
||||||
|
std::string thePath = pathToCopy;
|
||||||
|
std::string relativePath = (std::string)"." + DIRECTORY_DELIMITER_CHAR;
|
||||||
|
|
||||||
|
int len = (int)thePath.size() - 1;
|
||||||
|
|
||||||
|
if (len == -1)
|
||||||
|
thePath = relativePath;
|
||||||
|
else
|
||||||
|
if (thePath[len] != DIRECTORY_DELIMITER_CHAR)
|
||||||
|
thePath += DIRECTORY_DELIMITER_CHAR;
|
||||||
|
|
||||||
|
if (!Path::IsPathRooted(thePath))
|
||||||
|
{
|
||||||
|
thePath = (std::string)pathToModule + thePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
strncpy(buffer, thePath.c_str(), MAX_PATH);
|
||||||
|
#ifdef HOST_WINDOWS
|
||||||
|
FCEUD_MakePathDirs(buffer);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else if (action == SET)
|
||||||
|
{
|
||||||
|
int len = strlen(buffer) - 1;
|
||||||
|
if (buffer[len] == DIRECTORY_DELIMITER_CHAR)
|
||||||
|
buffer[len] = '\0';
|
||||||
|
|
||||||
|
strncpy(pathToCopy, buffer, MAX_PATH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string PathInfo::getpath(KnownPath path)
|
||||||
|
{
|
||||||
|
char temp[MAX_PATH];
|
||||||
|
SwitchPath(GET, path, temp);
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathInfo::getpath(KnownPath path, char *buffer)
|
||||||
|
{
|
||||||
|
SwitchPath(GET, path, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathInfo::setpath(KnownPath path, char *buffer)
|
||||||
|
{
|
||||||
|
SwitchPath(SET, path, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathInfo::getfilename(char *buffer, int maxCount)
|
||||||
|
{
|
||||||
|
strcpy(buffer, noextension().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathInfo::getpathnoext(KnownPath path, char *buffer)
|
||||||
|
{
|
||||||
|
getpath(path, buffer);
|
||||||
|
strcat(buffer, GetRomNameWithoutExtension().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string PathInfo::extension()
|
||||||
|
{
|
||||||
|
return Path::GetFileExt(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string PathInfo::noextension()
|
||||||
|
{
|
||||||
|
std::string romNameWithPath = Path::GetFileDirectoryPath(path) + DIRECTORY_DELIMITER_CHAR + Path::GetFileNameWithoutExt(RomName);
|
||||||
|
|
||||||
|
return romNameWithPath;
|
||||||
|
}
|
||||||
|
|
||||||
void PathInfo::formatname(char *output)
|
void PathInfo::formatname(char *output)
|
||||||
{
|
{
|
||||||
// Except 't' for tick and 'r' for random.
|
// Except 't' for tick and 'r' for random.
|
||||||
|
@ -257,3 +455,43 @@ void PathInfo::formatname(char *output)
|
||||||
|
|
||||||
strncpy(output, file.c_str(), MAX_PATH);
|
strncpy(output, file.c_str(), MAX_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PathInfo::ImageFormat PathInfo::imageformat() {
|
||||||
|
return currentimageformat;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PathInfo::SetRomName(const char *filename)
|
||||||
|
{
|
||||||
|
std::string romPath = filename;
|
||||||
|
|
||||||
|
RomName = Path::GetFileNameFromPath(romPath);
|
||||||
|
RomName = Path::ScrubInvalid(RomName);
|
||||||
|
RomDirectory = Path::GetFileDirectoryPath(romPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *PathInfo::GetRomName()
|
||||||
|
{
|
||||||
|
return RomName.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string PathInfo::GetRomNameWithoutExtension()
|
||||||
|
{
|
||||||
|
if (RomName.c_str() == NULL)
|
||||||
|
return "";
|
||||||
|
return Path::GetFileNameWithoutExt(RomName);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PathInfo::isdsgba(std::string fileName)
|
||||||
|
{
|
||||||
|
size_t i = fileName.find_last_of(FILE_EXT_DELIMITER_CHAR);
|
||||||
|
|
||||||
|
if (i != std::string::npos) {
|
||||||
|
fileName = fileName.substr(i - 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileName == "ds.gba") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
|
@ -118,34 +118,7 @@ public:
|
||||||
|
|
||||||
void init(const char *filename);
|
void init(const char *filename);
|
||||||
|
|
||||||
void LoadModulePath()
|
void LoadModulePath();
|
||||||
{
|
|
||||||
#if defined(HOST_WINDOWS)
|
|
||||||
|
|
||||||
char *p;
|
|
||||||
ZeroMemory(pathToModule, sizeof(pathToModule));
|
|
||||||
|
|
||||||
GetModuleFileName(NULL, pathToModule, sizeof(pathToModule));
|
|
||||||
p = pathToModule + lstrlen(pathToModule);
|
|
||||||
while (p >= pathToModule && *p != DIRECTORY_DELIMITER_CHAR) p--;
|
|
||||||
if (++p >= pathToModule) *p = 0;
|
|
||||||
|
|
||||||
extern char* _hack_alternateModulePath;
|
|
||||||
if(_hack_alternateModulePath)
|
|
||||||
{
|
|
||||||
strcpy(pathToModule,_hack_alternateModulePath);
|
|
||||||
}
|
|
||||||
#elif defined(DESMUME_COCOA)
|
|
||||||
std::string pathStr = Path::GetFileDirectoryPath(path);
|
|
||||||
|
|
||||||
strncpy(pathToModule, pathStr.c_str(), MAX_PATH);
|
|
||||||
#else
|
|
||||||
char *cwd = g_build_filename(g_get_user_config_dir(), "desmume", NULL);
|
|
||||||
g_mkdir_with_parents(cwd, 0755);
|
|
||||||
strncpy(pathToModule, cwd, MAX_PATH);
|
|
||||||
g_free(cwd);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Action
|
enum Action
|
||||||
{
|
{
|
||||||
|
@ -153,174 +126,27 @@ public:
|
||||||
SET
|
SET
|
||||||
};
|
};
|
||||||
|
|
||||||
void GetDefaultPath(char *pathToDefault, const char *key, int maxCount)
|
void GetDefaultPath(char *pathToDefault, const char *key, int maxCount);
|
||||||
{
|
|
||||||
#ifdef HOST_WINDOWS
|
|
||||||
std::string temp = (std::string)"." + DIRECTORY_DELIMITER_CHAR + pathToDefault;
|
|
||||||
strncpy(pathToDefault, temp.c_str(), maxCount);
|
|
||||||
#else
|
|
||||||
strncpy(pathToDefault, pathToModule, maxCount);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReadKey(char *pathToRead, const char *key)
|
void ReadKey(char *pathToRead, const char *key);
|
||||||
{
|
|
||||||
#ifdef HOST_WINDOWS
|
|
||||||
GetPrivateProfileString(SECTION, key, key, pathToRead, MAX_PATH, IniName);
|
|
||||||
if(strcmp(pathToRead, key) == 0) {
|
|
||||||
//since the variables are all intialized in this file they all use MAX_PATH
|
|
||||||
GetDefaultPath(pathToRead, key, MAX_PATH);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
//since the variables are all intialized in this file they all use MAX_PATH
|
|
||||||
GetDefaultPath(pathToRead, key, MAX_PATH);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReadPathSettings()
|
void ReadPathSettings();
|
||||||
{
|
|
||||||
if( ( strcmp(pathToModule, "") == 0) || !pathToModule)
|
|
||||||
LoadModulePath();
|
|
||||||
|
|
||||||
ReadKey(pathToRoms, ROMKEY);
|
void SwitchPath(Action action, KnownPath path, char *buffer);
|
||||||
ReadKey(pathToBattery, BATTERYKEY);
|
|
||||||
ReadKey(pathToStates, STATEKEY);
|
|
||||||
ReadKey(pathToScreenshots, SCREENSHOTKEY);
|
|
||||||
ReadKey(pathToAviFiles, AVIKEY);
|
|
||||||
ReadKey(pathToCheats, CHEATKEY);
|
|
||||||
ReadKey(pathToSounds, SOUNDKEY);
|
|
||||||
ReadKey(pathToFirmware, FIRMWAREKEY);
|
|
||||||
ReadKey(pathToLua, LUAKEY);
|
|
||||||
ReadKey(pathToSlot1D, SLOT1DKEY);
|
|
||||||
#ifdef HOST_WINDOWS
|
|
||||||
GetPrivateProfileString(SECTION, FORMATKEY, "%f_%s_%r", screenshotFormat, MAX_FORMAT, IniName);
|
|
||||||
savelastromvisit = GetPrivateProfileBool(SECTION, LASTVISITKEY, true, IniName);
|
|
||||||
currentimageformat = (ImageFormat)GetPrivateProfileInt(SECTION, DEFAULTFORMATKEY, PNG, IniName);
|
|
||||||
r4Format = (R4Format)GetPrivateProfileInt(SECTION, R4FORMATKEY, R4_CHEAT_DAT, IniName);
|
|
||||||
if ((r4Format != R4_CHEAT_DAT) && (r4Format != R4_USRCHEAT_DAT))
|
|
||||||
{
|
|
||||||
r4Format = R4_USRCHEAT_DAT;
|
|
||||||
WritePrivateProfileInt(SECTION, R4FORMATKEY, r4Format, IniName);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
/*
|
|
||||||
needsSaving = GetPrivateProfileInt(SECTION, NEEDSSAVINGKEY, TRUE, IniName);
|
|
||||||
if(needsSaving)
|
|
||||||
{
|
|
||||||
needsSaving = FALSE;
|
|
||||||
WritePathSettings();
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
void SwitchPath(Action action, KnownPath path, char *buffer)
|
std::string getpath(KnownPath path);
|
||||||
{
|
|
||||||
char *pathToCopy = 0;
|
|
||||||
switch(path)
|
|
||||||
{
|
|
||||||
case ROMS:
|
|
||||||
pathToCopy = pathToRoms;
|
|
||||||
break;
|
|
||||||
case BATTERY:
|
|
||||||
pathToCopy = pathToBattery;
|
|
||||||
break;
|
|
||||||
case STATES:
|
|
||||||
pathToCopy = pathToStates;
|
|
||||||
break;
|
|
||||||
case SCREENSHOTS:
|
|
||||||
pathToCopy = pathToScreenshots;
|
|
||||||
break;
|
|
||||||
case AVI_FILES:
|
|
||||||
pathToCopy = pathToAviFiles;
|
|
||||||
break;
|
|
||||||
case CHEATS:
|
|
||||||
pathToCopy = pathToCheats;
|
|
||||||
break;
|
|
||||||
case SOUNDS:
|
|
||||||
pathToCopy = pathToSounds;
|
|
||||||
break;
|
|
||||||
case FIRMWARE:
|
|
||||||
pathToCopy = pathToFirmware;
|
|
||||||
break;
|
|
||||||
case MODULE:
|
|
||||||
pathToCopy = pathToModule;
|
|
||||||
break;
|
|
||||||
case SLOT1D:
|
|
||||||
pathToCopy = pathToSlot1D;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(action == GET)
|
void getpath(KnownPath path, char *buffer);
|
||||||
{
|
|
||||||
std::string thePath = pathToCopy;
|
|
||||||
std::string relativePath = (std::string)"." + DIRECTORY_DELIMITER_CHAR;
|
|
||||||
|
|
||||||
int len = (int)thePath.size()-1;
|
void setpath(KnownPath path, char *buffer);
|
||||||
|
|
||||||
if(len == -1)
|
void getfilename(char *buffer, int maxCount);
|
||||||
thePath = relativePath;
|
|
||||||
else
|
|
||||||
if(thePath[len] != DIRECTORY_DELIMITER_CHAR)
|
|
||||||
thePath += DIRECTORY_DELIMITER_CHAR;
|
|
||||||
|
|
||||||
if(!Path::IsPathRooted(thePath))
|
void getpathnoext(KnownPath path, char *buffer);
|
||||||
{
|
|
||||||
thePath = (std::string)pathToModule + thePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
strncpy(buffer, thePath.c_str(), MAX_PATH);
|
std::string extension();
|
||||||
#ifdef HOST_WINDOWS
|
|
||||||
FCEUD_MakePathDirs(buffer);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else if(action == SET)
|
|
||||||
{
|
|
||||||
int len = strlen(buffer)-1;
|
|
||||||
if(buffer[len] == DIRECTORY_DELIMITER_CHAR)
|
|
||||||
buffer[len] = '\0';
|
|
||||||
|
|
||||||
strncpy(pathToCopy, buffer, MAX_PATH);
|
std::string noextension();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string getpath(KnownPath path)
|
|
||||||
{
|
|
||||||
char temp[MAX_PATH];
|
|
||||||
SwitchPath(GET, path, temp);
|
|
||||||
return temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
void getpath(KnownPath path, char *buffer)
|
|
||||||
{
|
|
||||||
SwitchPath(GET, path, buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
void setpath(KnownPath path, char *buffer)
|
|
||||||
{
|
|
||||||
SwitchPath(SET, path, buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
void getfilename(char *buffer, int maxCount)
|
|
||||||
{
|
|
||||||
strcpy(buffer,noextension().c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
void getpathnoext(KnownPath path, char *buffer)
|
|
||||||
{
|
|
||||||
getpath(path, buffer);
|
|
||||||
strcat(buffer, GetRomNameWithoutExtension().c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string extension()
|
|
||||||
{
|
|
||||||
return Path::GetFileExt(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string noextension()
|
|
||||||
{
|
|
||||||
std::string romNameWithPath = Path::GetFileDirectoryPath(path) + DIRECTORY_DELIMITER_CHAR + Path::GetFileNameWithoutExt(RomName);
|
|
||||||
|
|
||||||
return romNameWithPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
void formatname(char *output);
|
void formatname(char *output);
|
||||||
|
|
||||||
|
@ -339,45 +165,15 @@ public:
|
||||||
|
|
||||||
ImageFormat currentimageformat;
|
ImageFormat currentimageformat;
|
||||||
|
|
||||||
ImageFormat imageformat() {
|
ImageFormat imageformat();
|
||||||
return currentimageformat;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetRomName(const char *filename)
|
void SetRomName(const char *filename);
|
||||||
{
|
|
||||||
std::string romPath = filename;
|
|
||||||
|
|
||||||
RomName = Path::GetFileNameFromPath(romPath);
|
const char *GetRomName();
|
||||||
RomName = Path::ScrubInvalid(RomName);
|
|
||||||
RomDirectory = Path::GetFileDirectoryPath(romPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *GetRomName()
|
std::string GetRomNameWithoutExtension();
|
||||||
{
|
|
||||||
return RomName.c_str();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string GetRomNameWithoutExtension()
|
bool isdsgba(std::string fileName);
|
||||||
{
|
|
||||||
if (RomName.c_str() == NULL)
|
|
||||||
return "";
|
|
||||||
return Path::GetFileNameWithoutExt(RomName);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isdsgba(std::string fileName)
|
|
||||||
{
|
|
||||||
size_t i = fileName.find_last_of(FILE_EXT_DELIMITER_CHAR);
|
|
||||||
|
|
||||||
if (i != std::string::npos) {
|
|
||||||
fileName = fileName.substr(i - 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(fileName == "ds.gba") {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern PathInfo path;
|
extern PathInfo path;
|
||||||
|
|
Loading…
Reference in New Issue