DEV9: GHC related changes

This commit is contained in:
TheLastRar 2021-05-09 12:19:33 +01:00 committed by lightningterror
parent 0b51f09a38
commit af63023d92
3 changed files with 3 additions and 10 deletions
pcsx2/DEV9

View File

@ -199,19 +199,14 @@ s32 DEV9open(void* pDsp)
DevCon.WriteLn("DEV9: open r+: %s", config.Hdd);
#endif
#ifdef _WIN32
ghc::filesystem::path hddPath(std::wstring(config.Hdd));
#else
ghc::filesystem::path hddPath(config.Hdd);
#endif
if (hddPath.empty())
config.hddEnable = false;
if (hddPath.is_relative())
{
//GHC uses UTF8 on all platforms
ghc::filesystem::path path(GetSettingsFolder().ToUTF8().data());
ghc::filesystem::path path(GetSettingsFolder().ToString().wx_str());
hddPath = path / hddPath;
}

View File

@ -279,8 +279,7 @@ void OnOk()
if (hddPath.is_relative())
{
//GHC uses UTF8 on all platforms
ghc::filesystem::path path(GetSettingsFolder().ToUTF8().data());
ghc::filesystem::path path(GetSettingsFolder().ToString().wx_str());
hddPath = path / hddPath;
}

View File

@ -218,8 +218,7 @@ void OnBrowse(HWND hW)
wchar_t wbuff[4096] = {0};
memcpy(wbuff, HDD_DEF, sizeof(HDD_DEF));
//GHC uses UTF8 on all platforms
ghc::filesystem::path inis = GetSettingsFolder().ToUTF8().data();
ghc::filesystem::path inis(GetSettingsFolder().ToString().wx_str());
wstring w_inis = inis.wstring();
OPENFILENAMEW ofn;