mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-15 15:32:15 +02:00
Cover new Chinese and Brazilian Portuguese language IDs for nacpGetLanguageEntry
This commit is contained in:
parent
70ea18a477
commit
96f063ac13
@ -7,7 +7,7 @@
|
||||
#include "services/set.h"
|
||||
#include "nacp.h"
|
||||
|
||||
static u32 g_nacpLanguageTable[15] = {
|
||||
static u32 g_nacpLanguageTable[18] = {
|
||||
[SetLanguage_JA] = 2,
|
||||
[SetLanguage_ENUS] = 0,
|
||||
[SetLanguage_ENGB] = 1,
|
||||
@ -22,7 +22,10 @@ static u32 g_nacpLanguageTable[15] = {
|
||||
[SetLanguage_RU] = 11,
|
||||
[SetLanguage_KO] = 12,
|
||||
[SetLanguage_ZHTW] = 13,
|
||||
[SetLanguage_ZHHANT] = 13,
|
||||
[SetLanguage_ZHCN] = 14,
|
||||
[SetLanguage_ZHHANS] = 14,
|
||||
[SetLanguage_PTBR] = 15
|
||||
};
|
||||
|
||||
//Official sw uses nsam for this, but since that's a privileged service, use set-service instead for compatibility with newer system-versions.
|
||||
@ -49,7 +52,7 @@ Result nacpGetLanguageEntry(NacpStruct* nacp, NacpLanguageEntry** langentry) {
|
||||
if (Language < 0)
|
||||
rc = MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
||||
|
||||
if (R_SUCCEEDED(rc) && Language >= 15)
|
||||
if (R_SUCCEEDED(rc) && Language >= 18)
|
||||
Language = SetLanguage_ENUS;//Use ENUS for unsupported system languages.
|
||||
|
||||
setExit();
|
||||
|
Loading…
Reference in New Issue
Block a user