New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RiivolutionPatcher: Use capitalization of file that exists in the host file system if possible. #11444
RiivolutionPatcher: Use capitalization of file that exists in the host file system if possible. #11444
Conversation
| @@ -716,4 +716,12 @@ void ToUpper(std::string* str) | |||
| { | |||
| std::transform(str->begin(), str->end(), str->begin(), [](char c) { return Common::ToUpper(c); }); | |||
| } | |||
|
|
|||
| bool CaseInsensitiveEquals(std::string_view a, std::string_view b) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this works for utf8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess most/everything in the file doesn't actually work for utf8, so whatever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works for UTF-8 as long as you don't need case insensitivity for codepoints U+0080 and up, which I think is good enough unless we have evidence Riivolution does something different on a real Wii.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... I have no idea how case-insensitivity for the SD card filesystem on a Wii behaves. Would need to test that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally dolphin should handle host paths and emulated paths differently. For now it doesn't seem to matter as the existing code in the file ignores differences (if IOS code is calling them, idk), and doesn't properly handle utf8 anyway, so it can be improved in the future. just pointing it out...
bdb6822
to
293587a
Compare
|
I just saw someone running into this on Discord again... I'll just merge this for now, I'll be around for issues and improvements anyway. |
293587a
to
a0974c1
Compare
Fixes https://bugs.dolphin-emu.org/issues/13138
Searching the file system for a file every time the given path does not exist is not particularly efficient, but I don't think it matters much. Most XML files seem to be well-behaved anyway.