Precompose unicode characters before displaying since HFS+ and APFS is using decomposed form
This commit is contained in:
parent
98c4343410
commit
94caf86d4d
|
@ -145,6 +145,10 @@ void select_directory_popup(const char *prompt, float scaling, StringCallback ca
|
|||
if (entry == NULL)
|
||||
break;
|
||||
std::string name(entry->d_name);
|
||||
#ifdef __APPLE__
|
||||
extern std::string os_PrecomposedString(std::string string);
|
||||
name = os_PrecomposedString(name);
|
||||
#endif
|
||||
if (name == ".")
|
||||
continue;
|
||||
std::string child_path = path + "/" + name;
|
||||
|
|
|
@ -252,3 +252,7 @@ extern "C" void emu_set_mouse_position(int x, int y, int width, int height)
|
|||
std::string os_Locale(){
|
||||
return [[[NSLocale autoupdatingCurrentLocale] localeIdentifier] UTF8String];
|
||||
}
|
||||
|
||||
std::string os_PrecomposedString(std::string string){
|
||||
return [[[NSString stringWithUTF8String:string.c_str()] precomposedStringWithCanonicalMapping] UTF8String];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue