[XAM] XGetLanguage: Get user language based on config
This commit is contained in:
parent
9ed3881b3b
commit
080a65cd4f
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
#include "third_party/fmt/include/fmt/format.h"
|
#include "third_party/fmt/include/fmt/format.h"
|
||||||
|
|
||||||
|
DECLARE_int32(user_language);
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace kernel {
|
namespace kernel {
|
||||||
namespace xam {
|
namespace xam {
|
||||||
|
@ -206,16 +208,16 @@ dword_result_t XGetGameRegion_entry() { return xeXGetGameRegion(); }
|
||||||
DECLARE_XAM_EXPORT1(XGetGameRegion, kNone, kStub);
|
DECLARE_XAM_EXPORT1(XGetGameRegion, kNone, kStub);
|
||||||
|
|
||||||
dword_result_t XGetLanguage_entry() {
|
dword_result_t XGetLanguage_entry() {
|
||||||
auto desired_language = XLanguage::kEnglish;
|
auto desired_language = static_cast<XLanguage>(cvars::user_language);
|
||||||
|
|
||||||
// Switch the language based on game region.
|
// Switch the language based on game region.
|
||||||
// TODO(benvanik): pull from xex header.
|
// TODO(benvanik): pull from xex header.
|
||||||
uint32_t game_region = XEX_REGION_NTSCU;
|
/* uint32_t game_region = XEX_REGION_NTSCU;
|
||||||
if (game_region & XEX_REGION_NTSCU) {
|
if (game_region & XEX_REGION_NTSCU) {
|
||||||
desired_language = XLanguage::kEnglish;
|
desired_language = XLanguage::kEnglish;
|
||||||
} else if (game_region & XEX_REGION_NTSCJ) {
|
} else if (game_region & XEX_REGION_NTSCJ) {
|
||||||
desired_language = XLanguage::kJapanese;
|
desired_language = XLanguage::kJapanese;
|
||||||
}
|
}*/
|
||||||
// Add more overrides?
|
// Add more overrides?
|
||||||
|
|
||||||
return uint32_t(desired_language);
|
return uint32_t(desired_language);
|
||||||
|
|
Loading…
Reference in New Issue