diff options
author | leviathan <leviathan@lindenlab.com> | 2024-09-03 15:38:35 -0700 |
---|---|---|
committer | Andrew Meadows <andrew.l.meadows@gmail.com> | 2024-10-03 09:16:46 -0700 |
commit | 0617923ae7f450ece7288f8a73446c45a8ed32db (patch) | |
tree | 1914627e41be3619eb335aa28e6acdfb98925ea0 /indra/llwindow/llkeyboard.h | |
parent | 8213a0fb6b3149042d6833c8f0c4a3c1bfdc8bc9 (diff) |
remove crashy LLSD ctor used by GameControl
Diffstat (limited to 'indra/llwindow/llkeyboard.h')
-rw-r--r-- | indra/llwindow/llkeyboard.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/llwindow/llkeyboard.h b/indra/llwindow/llkeyboard.h index d91e023b85..da406b28e8 100644 --- a/indra/llwindow/llkeyboard.h +++ b/indra/llwindow/llkeyboard.h @@ -55,10 +55,12 @@ class LLWindowCallbacks; class LLKeyboard { public: -#ifndef LL_SDL - typedef U16 NATIVE_KEY_TYPE; -#else +#ifdef LL_LINUX + // linux relies on SDL2 which uses U32 for its native key type typedef U32 NATIVE_KEY_TYPE; +#else + // on non-linux platforms we can get by with a smaller native key type + typedef U16 NATIVE_KEY_TYPE; #endif LLKeyboard(); virtual ~LLKeyboard(); @@ -73,9 +75,9 @@ public: bool getKeyRepeated(const KEY key) { return mKeyRepeated[key]; } bool translateKey(const NATIVE_KEY_TYPE os_key, KEY *translated_key); - NATIVE_KEY_TYPE 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 + NATIVE_KEY_TYPE inverseTranslateKey(const KEY translated_key); + bool handleTranslatedKeyUp(KEY translated_key, MASK translated_mask); // Translated into "Linden" keycodes + bool handleTranslatedKeyDown(KEY translated_key, MASK translated_mask); // Translated into "Linden" keycodes virtual bool handleKeyUp(const NATIVE_KEY_TYPE key, MASK mask) = 0; virtual bool handleKeyDown(const NATIVE_KEY_TYPE key, MASK mask) = 0; |