mirror of
https://github.com/joel16/SwitchIdent.git
synced 2024-11-23 11:49:43 +00:00
Fix error code returned by setGetSystemLanguage
Now we get an empty string, hm.
This commit is contained in:
parent
f9ddb9a0d0
commit
f60394002c
@ -1,4 +1,5 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
@ -7,37 +8,12 @@
|
||||
const char *SwitchIdent_GetLanguage(void)
|
||||
{
|
||||
Result ret = 0;
|
||||
|
||||
const char *languages[] =
|
||||
{
|
||||
"Japanese",
|
||||
"US English",
|
||||
"French",
|
||||
"German",
|
||||
"Italian",
|
||||
"Spanish",
|
||||
"Simplified Chinese",
|
||||
"Korean",
|
||||
"Dutch",
|
||||
"Portugese",
|
||||
"Russian",
|
||||
"Traditional Chinese",
|
||||
"UK English",
|
||||
"Canadian French",
|
||||
"Latin American Spanish",
|
||||
"Unknown"
|
||||
};
|
||||
|
||||
u64 language = 0;
|
||||
|
||||
if (R_SUCCEEDED(ret = setGetSystemLanguage(&language)))
|
||||
{
|
||||
if (language < 15)
|
||||
return languages[language];
|
||||
}
|
||||
if (R_FAILED(ret = setGetSystemLanguage(&language)))
|
||||
printf("setGetSystemLanguage(language) failed: 0x%x.\n\n", ret);
|
||||
|
||||
printf("setGetSystemLanguage(language) failed: 0x%x.\n\n", ret);
|
||||
return languages[15];
|
||||
return strupr((char*)&language);
|
||||
}
|
||||
|
||||
// Not sure about this yet.
|
||||
|
Loading…
Reference in New Issue
Block a user