Merge pull request #2386 from LukeUsher/fix-multi-xbe-vfs

emufile: fix multi-xbe titles when running through xbox-iso-vfs
This commit is contained in:
Luke Usher 2022-07-11 14:22:49 +01:00 committed by GitHub
commit 9fab1d5bed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -797,9 +797,10 @@ std::string CxbxConvertXboxToHostPath(const std::string_view XboxDevicePath)
// If the rootDirectoryHandle is not null, we have a relative path
// We need to prepend the path of the root directory to get a full DOS path
if (rootDirectoryHandle != nullptr) {
char directoryPathBuffer[MAX_PATH];
GetFinalPathNameByHandle(rootDirectoryHandle, directoryPathBuffer, MAX_PATH, VOLUME_NAME_DOS);
XbePath = directoryPathBuffer + std::string("\\") + XbePath;
WCHAR directoryPathBuffer[MAX_PATH];
GetFinalPathNameByHandleW(rootDirectoryHandle, directoryPathBuffer, MAX_PATH, VOLUME_NAME_DOS);
std::string directoryPath = utf16_to_ascii(directoryPathBuffer);
XbePath = directoryPath + std::string("\\") + XbePath;
}
return XbePath;