More accuracy improvements

That one comment should go in the accurate branch, not here
This commit is contained in:
Clownacy 2020-06-30 14:04:53 +01:00
parent 56bf0f8c76
commit 47367614a3
4 changed files with 9 additions and 6 deletions

View file

@ -57,10 +57,11 @@ void Backend_PostWindowCreation(void)
bool Backend_GetBasePath(std::string *string_buffer)
{
*string_buffer = WHBGetSdCardMountPath();
#ifdef JAPANESE
*string_buffer = std::string{WHBGetSdCardMountPath()} + "/CSE2-portable-jp";
*string_buffer += "/CSE2-portable-jp";
#else
*string_buffer = std::string{WHBGetSdCardMountPath()} + "/CSE2-portable-en";
*string_buffer += "/CSE2-portable-en";
#endif
return true;

View file

@ -17,9 +17,10 @@ BOOL LoadConfigData(CONFIG *conf)
// Clear old configuration data
memset(conf, 0, sizeof(CONFIG));
// Open file
// Get path
std::string path = gModulePath + '/' + gConfigName;
// Open file
FILE *fp = fopen(path.c_str(), "rb");
if (fp == NULL)
return FALSE;

View file

@ -50,7 +50,9 @@ BOOL GetCompileVersion(int *v1, int *v2, int *v3, int *v4)
void DeleteLog(void)
{
std::string path = gModulePath + "/debug.txt";
std::string path;
path = gModulePath + "/debug.txt";
remove(path.c_str());
}
@ -83,7 +85,6 @@ BOOL IsKeyFile(const char *name)
return TRUE;
}
// Some code uses this as CheckFileExists, checking if the return value is -1
long GetFileSizeLong(const char *path)
{
long len;

View file

@ -131,7 +131,7 @@ BOOL LoadProfile(const char *name)
path = name;
else
path = gModulePath + '/' + gDefaultName;
// Open file
fp = fopen(path.c_str(), "rb");
if (fp == NULL)