mirror of https://github.com/libsdl-org/SDL.git
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:
parent
53aaf8c26b
commit
156b3b4a8c
|
|
@ -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)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue