mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
Open std::fstream in a unicode-safe manner.
This commit is contained in:
parent
95558cdc69
commit
dea1e2827d
19 changed files with 57 additions and 25 deletions
|
@ -25,6 +25,7 @@
|
|||
#include <fstream>
|
||||
#include <algorithm>
|
||||
|
||||
#include "FileUtil.h"
|
||||
#include "StringUtil.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
|
@ -400,7 +401,7 @@ bool IniFile::Load(const char* filename)
|
|||
|
||||
// Open file
|
||||
std::ifstream in;
|
||||
in.open(filename, std::ios::in);
|
||||
OpenFStream(in, filename, std::ios::in);
|
||||
|
||||
if (in.fail()) return false;
|
||||
|
||||
|
@ -452,7 +453,7 @@ bool IniFile::Load(const char* filename)
|
|||
bool IniFile::Save(const char* filename)
|
||||
{
|
||||
std::ofstream out;
|
||||
out.open(filename, std::ios::out);
|
||||
OpenFStream(out, filename, std::ios::out);
|
||||
|
||||
if (out.fail())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue