mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-04 14:01:17 +12:00
FSC: Use utf8 path strings instead of wchar
Also introduced helper function _utf8ToPath() to convert a utf8-encoded string to fs::path
This commit is contained in:
parent
1ce629126a
commit
168ecf8825
9 changed files with 38 additions and 43 deletions
|
@ -29,11 +29,10 @@ void fscDeviceRedirect_add(std::string_view virtualSourcePath, const fs::path& t
|
|||
|
||||
class fscDeviceTypeRedirect : public fscDeviceC
|
||||
{
|
||||
FSCVirtualFile* fscDeviceOpenByPath(std::wstring_view pathW, FSC_ACCESS_FLAG accessFlags, void* ctx, sint32* fscStatus) override
|
||||
FSCVirtualFile* fscDeviceOpenByPath(std::string_view path, FSC_ACCESS_FLAG accessFlags, void* ctx, sint32* fscStatus) override
|
||||
{
|
||||
RedirectEntry* redirectionEntry;
|
||||
std::string pathTmp = boost::nowide::narrow(pathW);
|
||||
if (redirectTree.getFile(pathTmp, redirectionEntry))
|
||||
if (redirectTree.getFile(path, redirectionEntry))
|
||||
return FSCVirtualFile_Host::OpenFile(redirectionEntry->dstPath, accessFlags, *fscStatus);
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue