More accuracy improvements
That one comment should go in the accurate branch, not here
This commit is contained in:
parent
56bf0f8c76
commit
47367614a3
4 changed files with 9 additions and 6 deletions
|
@ -57,10 +57,11 @@ void Backend_PostWindowCreation(void)
|
||||||
|
|
||||||
bool Backend_GetBasePath(std::string *string_buffer)
|
bool Backend_GetBasePath(std::string *string_buffer)
|
||||||
{
|
{
|
||||||
|
*string_buffer = WHBGetSdCardMountPath();
|
||||||
#ifdef JAPANESE
|
#ifdef JAPANESE
|
||||||
*string_buffer = std::string{WHBGetSdCardMountPath()} + "/CSE2-portable-jp";
|
*string_buffer += "/CSE2-portable-jp";
|
||||||
#else
|
#else
|
||||||
*string_buffer = std::string{WHBGetSdCardMountPath()} + "/CSE2-portable-en";
|
*string_buffer += "/CSE2-portable-en";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -17,9 +17,10 @@ BOOL LoadConfigData(CONFIG *conf)
|
||||||
// Clear old configuration data
|
// Clear old configuration data
|
||||||
memset(conf, 0, sizeof(CONFIG));
|
memset(conf, 0, sizeof(CONFIG));
|
||||||
|
|
||||||
// Open file
|
// Get path
|
||||||
std::string path = gModulePath + '/' + gConfigName;
|
std::string path = gModulePath + '/' + gConfigName;
|
||||||
|
|
||||||
|
// Open file
|
||||||
FILE *fp = fopen(path.c_str(), "rb");
|
FILE *fp = fopen(path.c_str(), "rb");
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -50,7 +50,9 @@ BOOL GetCompileVersion(int *v1, int *v2, int *v3, int *v4)
|
||||||
|
|
||||||
void DeleteLog(void)
|
void DeleteLog(void)
|
||||||
{
|
{
|
||||||
std::string path = gModulePath + "/debug.txt";
|
std::string path;
|
||||||
|
|
||||||
|
path = gModulePath + "/debug.txt";
|
||||||
remove(path.c_str());
|
remove(path.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +85,6 @@ BOOL IsKeyFile(const char *name)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some code uses this as CheckFileExists, checking if the return value is -1
|
|
||||||
long GetFileSizeLong(const char *path)
|
long GetFileSizeLong(const char *path)
|
||||||
{
|
{
|
||||||
long len;
|
long len;
|
||||||
|
|
|
@ -131,7 +131,7 @@ BOOL LoadProfile(const char *name)
|
||||||
path = name;
|
path = name;
|
||||||
else
|
else
|
||||||
path = gModulePath + '/' + gDefaultName;
|
path = gModulePath + '/' + gDefaultName;
|
||||||
|
|
||||||
// Open file
|
// Open file
|
||||||
fp = fopen(path.c_str(), "rb");
|
fp = fopen(path.c_str(), "rb");
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
|
|
Loading…
Add table
Reference in a new issue