mirror of
https://github.com/izzy2lost/xenia-edge.git
synced 2026-07-06 00:20:26 -07:00
[Kernel/VFS] Case-insensitive path matching...
for guest prefix stripping and device lookup
This commit is contained in:
@@ -407,9 +407,10 @@ void XamLoaderLaunchTitle_entry(lpstring_t raw_name_ptr, dword_t flags) {
|
||||
XELOGI("XamLoaderLaunchTitle: original host_path={}, launch_path={}",
|
||||
loader_data.host_path, launch_path);
|
||||
|
||||
// Remove common guest path prefixes
|
||||
// Remove common guest path prefixes (case-insensitive since Xbox
|
||||
// paths are case-insensitive, games may pass e.g. "GAME:\")
|
||||
auto remove_prefix = [&launch_path](std::string_view prefix) {
|
||||
if (launch_path.compare(0, prefix.length(), prefix) == 0) {
|
||||
if (xe::utf8::starts_with_case(launch_path, prefix)) {
|
||||
launch_path = launch_path.substr(prefix.length());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -134,7 +134,7 @@ Entry* VirtualFileSystem::ResolvePath(const std::string_view path) {
|
||||
// Find the device.
|
||||
auto it =
|
||||
std::find_if(devices_.cbegin(), devices_.cend(), [&](const auto& d) {
|
||||
return xe::utf8::starts_with(normalized_path, d->mount_path());
|
||||
return xe::utf8::starts_with_case(normalized_path, d->mount_path());
|
||||
});
|
||||
if (it == devices_.cend()) {
|
||||
// Supress logging the error for ShaderDumpxe:\CompareBackEnds as this is
|
||||
|
||||
Reference in New Issue
Block a user