From d58544b4067e10d0afd5ad21b26861853012405e Mon Sep 17 00:00:00 2001 From: gibbed Date: Wed, 4 Sep 2019 22:56:43 -0500 Subject: [PATCH] [XAM] Fix incomplete locale tables. --- src/xenia/kernel/xam/xam_locale.cc | 59 +++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/src/xenia/kernel/xam/xam_locale.cc b/src/xenia/kernel/xam/xam_locale.cc index 1c6c465ce..e2d1a76f7 100644 --- a/src/xenia/kernel/xam/xam_locale.cc +++ b/src/xenia/kernel/xam/xam_locale.cc @@ -75,7 +75,8 @@ const wchar_t* xeXamGetOnlineCountryString(uint8_t id) { L"PG", L"PN", L"RE", L"RW", L"WS", L"SM", L"ST", L"SN", L"RS", L"SC", L"SL", L"SB", L"SO", L"LK", L"SH", L"KN", L"LC", L"PM", L"VC", L"SR", L"SZ", L"TJ", L"TZ", L"TL", L"TG", L"TK", L"TO", - L"TM", L"TC", L"TV", L"UG", + L"TM", L"TC", L"TV", L"UG", L"VU", L"VA", nullptr, L"VG", L"WF", + L"EH", L"ZM", L"ZZ", }; #pragma warning(suppress : 6385) return id < xe::countof(table) ? table[id] : nullptr; @@ -94,6 +95,7 @@ const wchar_t* xeXamGetCountryString(uint8_t id) { L"PH", L"PK", L"PL", L"PR", L"PT", L"PY", L"QA", L"RO", L"RU", L"SA", L"SE", L"SG", L"SI", L"SK", nullptr, L"SV", L"SY", L"TH", L"TN", L"TR", L"TT", L"TW", L"UA", L"US", L"UY", L"UZ", L"VE", L"VN", L"YE", L"ZA", + L"ZW", L"ZZ", }; #pragma warning(suppress : 6385) return id < xe::countof(table) ? table[id] : nullptr; @@ -102,7 +104,7 @@ const wchar_t* xeXamGetCountryString(uint8_t id) { const wchar_t* xeXamGetLanguageString(uint8_t id) { static const wchar_t* const table[] = { L"zz", L"en", L"ja", L"de", L"fr", L"es", L"it", L"ko", L"zh", - L"pt", nullptr, L"pl", L"ru", L"sv", L"tr", L"nb", L"nl", + L"pt", nullptr, L"pl", L"ru", L"sv", L"tr", L"nb", L"nl", L"zh", }; #pragma warning(suppress : 6385) return id < xe::countof(table) ? table[id] : nullptr; @@ -122,9 +124,19 @@ const wchar_t* xeXamGetLocaleString(uint8_t id) { uint8_t xeXamGetLocaleFromOnlineCountry(uint8_t id) { static uint8_t const table[] = { - 0, 43, 0, 0, 40, 2, 1, 0, 3, 0, 0, 0, 0, 4, 0, - 0, 5, 0, 33, 6, 7, 8, 0, 9, 13, 10, 0, 0, 0, 0, - 0, 31, 11, 0, 12, 35, 0, 14, 0, 15, 0, 0, 16, + 0, 43, 0, 0, 40, 2, 1, 0, 3, 0, 0, 0, 0, 4, 0, 0, 5, 0, 33, + 6, 7, 8, 0, 9, 13, 10, 0, 0, 0, 0, 0, 31, 11, 0, 12, 35, 0, 14, + 0, 15, 0, 0, 16, 0, 18, 42, 17, 0, 0, 0, 19, 0, 0, 20, 0, 0, 21, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 23, 25, + 24, 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, 0, 37, 41, 32, 28, 0, 29, 0, + 0, 0, 0, 0, 39, 0, 34, 0, 36, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 38, }; #pragma warning(suppress : 6385) return id < xe::countof(table) ? table[id] : 0; @@ -132,9 +144,9 @@ uint8_t xeXamGetLocaleFromOnlineCountry(uint8_t id) { uint8_t xeXamGetLanguageFromOnlineLanguage(uint8_t id) { static uint8_t const table[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 11, 12, 1, 1, 15, 16, 13, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 17, 11, 12, 1, 1, 15, 16, 13, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 14, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; #pragma warning(suppress : 6385) return id < xe::countof(table) ? table[id] : 0; @@ -156,13 +168,21 @@ const wchar_t* xeXamGetOnlineLanguageString(uint8_t id) { uint8_t xeXamGetCountryFromOnlineCountry(uint8_t id) { static uint8_t const table[] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 0, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 0, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 0, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 0, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, }; #pragma warning(suppress : 6385) return id < xe::countof(table) ? table[id] : 0; @@ -170,9 +190,12 @@ uint8_t xeXamGetCountryFromOnlineCountry(uint8_t id) { uint8_t xeXamGetLocaleFromCountry(uint8_t id) { static uint8_t const table[] = { - 0, 43, 0, 0, 40, 2, 1, 0, 3, 0, 0, 0, 0, 4, 0, - 0, 5, 0, 33, 6, 7, 8, 0, 9, 13, 10, 0, 0, 0, 0, - 0, 31, 11, 0, 12, 35, 0, 14, 0, 15, 0, 0, 16, + 0, 43, 0, 0, 40, 2, 1, 0, 3, 0, 0, 0, 0, 4, 0, 0, 5, 0, 33, + 6, 7, 8, 0, 9, 13, 10, 0, 0, 0, 0, 0, 31, 11, 0, 12, 35, 0, 14, + 0, 15, 0, 0, 16, 0, 18, 42, 17, 0, 0, 0, 19, 0, 0, 20, 0, 0, 21, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 23, 25, + 24, 0, 0, 0, 0, 0, 26, 0, 27, 0, 0, 0, 37, 41, 32, 28, 0, 29, 0, + 0, 0, 0, 0, 39, 0, 34, 0, 36, 0, 0, 0, 0, 0, 30, 0, 38, }; #pragma warning(suppress : 6385) return id < xe::countof(table) ? table[id] : 0;