Compare commits

...

1 Commits

Author SHA1 Message Date
coah
e280c18c58 Decompile hardware keyboard language selection 2026-10-01 19:40:54 -05:00
3 changed files with 8 additions and 20 deletions

View File

@@ -149,6 +149,7 @@ namespace textinput {
void Update(); void Update();
u32 GetModifierState() const; u32 GetModifierState() const;
void SetCountry(u8 country);
void SetModifierState(u32, u32); void SetModifierState(u32, u32);
#if defined(TI_CELLPHONE_HKB_KEYSET) #if defined(TI_CELLPHONE_HKB_KEYSET)

View File

@@ -20,7 +20,7 @@ namespace textinput {
#else #else
~HWKeyboard(); ~HWKeyboard();
#endif #endif
#ifdef TIMANAGER_IMPLEMENTATION #if defined(TIMANAGER_IMPLEMENTATION) || defined(TIHWKEYBOARD_IMPLEMENTATION)
void setLanguage(Destination destination, Language language); void setLanguage(Destination destination, Language language);
#endif #endif

View File

@@ -5,8 +5,6 @@
#include "keyboard/tiHKBManager.h" #include "keyboard/tiHKBManager.h"
#include "keyboard/tiLayoutGather.h" #include "keyboard/tiLayoutGather.h"
extern "C" void SetCountry__Q39textinput5input10HKBManagerFUc();
extern "C" textinput::input::HKBManager sInstance__Q39textinput5input10HKBManager;
extern "C" void convertWCCode__Q49textinput8keyboard5hwkey10HWKeyboardCFw(); extern "C" void convertWCCode__Q49textinput8keyboard5hwkey10HWKeyboardCFw();
extern "C" bool updateInput__Q49textinput8keyboard5hwkey10HWKeyboardFRQ39textinput5input10HKBManager(); extern "C" bool updateInput__Q49textinput8keyboard5hwkey10HWKeyboardFRQ39textinput5input10HKBManager();
extern "C" void __dt__Q49textinput8keyboard5hwkey10HWKeyboardFv(); extern "C" void __dt__Q49textinput8keyboard5hwkey10HWKeyboardFv();
@@ -797,23 +795,12 @@ const u8 controlKeys[] = {
blr blr
} }
extern "C" asm void setLanguage__Q49textinput8keyboard5hwkey10HWKeyboardFQ29textinput11DestinationQ29textinput8Language() { void HWKeyboard::setLanguage(Destination destination, Language language) {
nofralloc if (destination == DST_EU) {
cmpwi r4, 2 input::HKBManager::getInstance().SetCountry(scCountryMap_EU[language]);
bne setLanguage_L1 } else {
lis r4, scCountryMap_EU@ha input::HKBManager::getInstance().SetCountry(scCountryMap_NonEU[language]);
lis r3, sInstance__Q39textinput5input10HKBManager@ha }
addi r4, r4, scCountryMap_EU@l
lbzx r4, r4, r5
addi r3, r3, sInstance__Q39textinput5input10HKBManager@l
b SetCountry__Q39textinput5input10HKBManagerFUc
setLanguage_L1:
lis r4, scCountryMap_NonEU@ha
lis r3, sInstance__Q39textinput5input10HKBManager@ha
addi r4, r4, scCountryMap_NonEU@l
lbzx r4, r4, r5
addi r3, r3, sInstance__Q39textinput5input10HKBManager@l
b SetCountry__Q39textinput5input10HKBManagerFUc
} }
} // namespace hwkey } // namespace hwkey