mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-14 13:56:00 +00:00
Fixed language detection on iOS
On iOS you might see traditional Chinese on a US phone as: "zh-Hans_US"
This commit is contained in:
@@ -73,7 +73,7 @@ static SDL_Locale **build_locales_from_csv_string(char *csv, int *count)
|
|||||||
loc->language = ptr++;
|
loc->language = ptr++;
|
||||||
while (true) {
|
while (true) {
|
||||||
const char ch = *ptr;
|
const char ch = *ptr;
|
||||||
if (ch == '_' || ch == '-') {
|
if (ch == '_') {
|
||||||
*(ptr++) = '\0';
|
*(ptr++) = '\0';
|
||||||
loc->country = ptr;
|
loc->country = ptr;
|
||||||
} else if (SDL_isspace(ch)) {
|
} else if (SDL_isspace(ch)) {
|
||||||
|
Reference in New Issue
Block a user