diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-08-15 16:28:26 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-08-15 23:24:06 +0800 |
commit | 6d31ea65d2c597397971fb97fc17610277104e1b (patch) | |
tree | ac19cde920e9dccac900dfa6a47599cfeedef893 /indra/llwindow/llkeyboard.h | |
parent | ee14fd56f2b49e4fb38822c85bab4d342117a177 (diff) |
SDL 1.2 to 2.0 migration
Both keycodes and scancodes are now 32 bits, so the key type is
lengthened from U16 to U32.
Diffstat (limited to 'indra/llwindow/llkeyboard.h')
-rw-r--r-- | indra/llwindow/llkeyboard.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index fb1ae10f50..2a700ce8e9 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -67,14 +67,14 @@ public: BOOL getKeyDown(const KEY key) { return mKeyLevel[key]; } BOOL getKeyRepeated(const KEY key) { return mKeyRepeated[key]; } - BOOL translateKey(const U16 os_key, KEY *translated_key); - U16 inverseTranslateKey(const KEY translated_key); + BOOL translateKey(const U32 os_key, KEY *translated_key); + U32 inverseTranslateKey(const KEY translated_key); BOOL handleTranslatedKeyUp(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes BOOL handleTranslatedKeyDown(KEY translated_key, U32 translated_mask); // Translated into "Linden" keycodes - virtual BOOL handleKeyUp(const U16 key, MASK mask) = 0; - virtual BOOL handleKeyDown(const U16 key, MASK mask) = 0; + virtual BOOL handleKeyUp(const U32 key, MASK mask) = 0; + virtual BOOL handleKeyDown(const U32 key, MASK mask) = 0; #ifdef LL_DARWIN // We only actually use this for OS X. @@ -109,8 +109,8 @@ protected: void addKeyName(KEY key, const std::string& name); protected: - std::map<U16, KEY> mTranslateKeyMap; // Map of translations from OS keys to Linden KEYs - std::map<KEY, U16> mInvTranslateKeyMap; // Map of translations from Linden KEYs to OS keys + std::map<U32, KEY> mTranslateKeyMap; // Map of translations from OS keys to Linden KEYs + std::map<KEY, U32> mInvTranslateKeyMap; // Map of translations from Linden KEYs to OS keys LLWindowCallbacks *mCallbacks; LLTimer mKeyLevelTimer[KEY_COUNT]; // Time since level was set |