From 6369047dcb74323b248de59bc8187db0d315548a Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 5 Jul 2024 20:24:10 +0800 Subject: Temporary Cocoa U16 vs. SDL2 U32 key types Even when maint-b is merged to main, webrtc-voice will very likely still have to wait until it's merged with main to get maint-b's changes. I'll worry about the conflicts later, just so any branch would build on SDL2 or not without any patches. --- indra/llwindow/llkeyboard.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/llwindow/llkeyboard.cpp') diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index b3dcac6222..e93ad28fdf 100644 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -195,9 +195,15 @@ void LLKeyboard::resetKeys() } +#if LL_SDL +BOOL LLKeyboard::translateKey(const U32 os_key, KEY *out_key) +{ + std::map::iterator iter; +#else BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key) { std::map::iterator iter; +#endif // Only translate keys in the map, ignore all other keys for now iter = mTranslateKeyMap.find(os_key); @@ -215,9 +221,15 @@ BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key) } +#if LL_SDL +U32 LLKeyboard::inverseTranslateKey(const KEY translated_key) +{ + std::map::iterator iter; +#else U16 LLKeyboard::inverseTranslateKey(const KEY translated_key) { std::map::iterator iter; +#endif iter = mInvTranslateKeyMap.find(translated_key); if (iter == mInvTranslateKeyMap.end()) { -- cgit v1.2.3