mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-02 08:42:45 +03:00
feat(client): register and set locale var in InitializeGlobal
This commit is contained in:
parent
6da008c942
commit
5b9950c594
@ -175,6 +175,12 @@ void Sub405DD0() {
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LocaleChangedCallback(CVar* var, const char* oldValue, const char* value, void* arg) {
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
int32_t InitializeGlobal() {
|
int32_t InitializeGlobal() {
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
@ -215,11 +221,20 @@ int32_t InitializeGlobal() {
|
|||||||
|
|
||||||
// CVar::Register("dbCompress", "Database compression", 0, "-1", 0, 5, 0, 0, 0);
|
// CVar::Register("dbCompress", "Database compression", 0, "-1", 0, 5, 0, 0, 0);
|
||||||
|
|
||||||
// v2 = CVar::Register("locale", "Set the game locale", 0, "****", &LocaleChangedCallback, 5, 0, 0, 0);
|
auto localeVar = CVar::Register(
|
||||||
|
"locale",
|
||||||
|
"Set the game locale",
|
||||||
|
0x0, "****",
|
||||||
|
&LocaleChangedCallback,
|
||||||
|
DEFAULT,
|
||||||
|
false,
|
||||||
|
nullptr,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
// if (!SStrCmp(v2->m_stringValue.m_str, "****", 0x7FFFFFFFu)) {
|
if (SStrCmp(localeVar->GetString(), "****") == 0) {
|
||||||
// CVar::Set(v2, "enUS", 1, 0, 0, 1);
|
localeVar->Set("enUS", true, false, false, true);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// CVar::Register("useEnglishAudio", "override the locale and use English audio", 0, "0", 0, 5, 0, 0, 0);
|
// CVar::Register("useEnglishAudio", "override the locale and use English audio", 0, "0", 0, 5, 0, 0, 0);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user