Skip to content

Commit

Permalink
DEV9: GHC related changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLastRar authored and lightningterror committed May 26, 2021
1 parent 0b51f09 commit af63023
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
7 changes: 1 addition & 6 deletions pcsx2/DEV9/DEV9.cpp
Expand Up @@ -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;
}

Expand Down
3 changes: 1 addition & 2 deletions pcsx2/DEV9/Linux/Linux.cpp
Expand Up @@ -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;
}

Expand Down
3 changes: 1 addition & 2 deletions pcsx2/DEV9/Win32/Win32.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit af63023

Please sign in to comment.