mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-17 03:14:34 +01:00
commit
a239a45ed2
1 file changed
+9
-2
+9
-2
@@ -20,6 +20,7 @@
|
||||
#include "file/vfs.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "../util/text/utf8.h"
|
||||
// Function Cross-Compatibility
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
@@ -412,8 +413,11 @@ bool IniFile::Load(const char* filename)
|
||||
|
||||
// Open file
|
||||
std::ifstream in;
|
||||
#ifdef _WIN32
|
||||
in.open(ConvertUTF8ToWString(filename), std::ios::in);
|
||||
#else
|
||||
in.open(filename, std::ios::in);
|
||||
|
||||
#endif
|
||||
if (in.fail()) return false;
|
||||
|
||||
bool success = Load(in);
|
||||
@@ -487,7 +491,11 @@ bool IniFile::Load(std::istream &in) {
|
||||
bool IniFile::Save(const char* filename)
|
||||
{
|
||||
std::ofstream out;
|
||||
#ifdef _WIN32
|
||||
out.open(ConvertUTF8ToWString(filename), std::ios::out);
|
||||
#else
|
||||
out.open(filename, std::ios::out);
|
||||
#endif
|
||||
|
||||
if (out.fail())
|
||||
{
|
||||
@@ -521,7 +529,6 @@ bool IniFile::Save(const char* filename)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool IniFile::Get(const char* sectionName, const char* key, std::string* value, const char* defaultValue)
|
||||
{
|
||||
Section* section = GetSection(sectionName);
|
||||
|
||||
Reference in new issue
Block a user