ref: 47367614a37f53168eba3bff38b386eb007b4c57
parent: 56bf0f8c763809bc7521538c2203d8ea3582b3e0
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Jun 30 10:04:53 EDT 2020
More accuracy improvements That one comment should go in the accurate branch, not here
--- a/src/Backends/Platform/WiiU.cpp
+++ b/src/Backends/Platform/WiiU.cpp
@@ -57,10 +57,11 @@
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;
--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -17,9 +17,10 @@
// 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;
--- a/src/Generic.cpp
+++ b/src/Generic.cpp
@@ -50,7 +50,9 @@
void DeleteLog(void)
{
- std::string path = gModulePath + "/debug.txt";
+ std::string path;
+
+ path = gModulePath + "/debug.txt";
remove(path.c_str());
}
@@ -83,7 +85,6 @@
return TRUE;
}
-// Some code uses this as CheckFileExists, checking if the return value is -1
long GetFileSizeLong(const char *path)
{
long len;
--- a/src/Profile.cpp
+++ b/src/Profile.cpp
@@ -131,7 +131,7 @@
path = name;
else
path = gModulePath + '/' + gDefaultName;
-
+
// Open file
fp = fopen(path.c_str(), "rb");
if (fp == NULL)