Don't use wrong encoding for paths when opening streams on Windows

This commit is contained in:
JosJuice 2017-12-05 21:23:35 +01:00
commit 9d8a82e1d9
7 changed files with 14 additions and 8 deletions

View file

@ -7,7 +7,6 @@
#include <algorithm>
#include <cstdlib>
#include <fstream>
#include <string>
#include <vector>

View file

@ -400,8 +400,8 @@ void Wiimote::ReadData(const wm_read_data* const rd)
{
// TODO Only read the Mii block parts required
std::ifstream file;
file.open((File::GetUserPath(D_SESSION_WIIROOT_IDX) + "/mii.bin").c_str(),
std::ios::binary | std::ios::in);
File::OpenFStream(file, (File::GetUserPath(D_SESSION_WIIROOT_IDX) + "/mii.bin").c_str(),
std::ios::binary | std::ios::in);
file.read((char*)m_eeprom + 0x0FCA, 0x02f0);
file.close();
}

View file

@ -58,7 +58,8 @@ MemoryWatcher::~MemoryWatcher()
bool MemoryWatcher::LoadAddresses(const std::string& path)
{
std::ifstream locations(path);
std::ifstream locations;
File::OpenFStream(locations, path, std::ios_base::in);
if (!locations)
return false;