diff options
Diffstat (limited to 'indra/llwindow/llkeyboard.cpp')
-rw-r--r-- | indra/llwindow/llkeyboard.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/indra/llwindow/llkeyboard.cpp b/indra/llwindow/llkeyboard.cpp index e93ad28fdf..d4b0743f32 100644 --- a/indra/llwindow/llkeyboard.cpp +++ b/indra/llwindow/llkeyboard.cpp @@ -41,7 +41,6 @@ std::map<KEY,std::string> LLKeyboard::sKeysToNames; std::map<std::string,KEY> LLKeyboard::sNamesToKeys; LLKeyStringTranslatorFunc* LLKeyboard::mStringTranslator = NULL; // Used for l10n + PC/Mac/Linux accelerator labeling - // // Class Implementation // @@ -195,18 +194,11 @@ void LLKeyboard::resetKeys() } -#if LL_SDL -BOOL LLKeyboard::translateKey(const U32 os_key, KEY *out_key) -{ - std::map<U32, KEY>::iterator iter; -#else -BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key) +BOOL LLKeyboard::translateKey(const NATIVE_KEY_TYPE os_key, KEY *out_key) { - std::map<U16, KEY>::iterator iter; -#endif // Only translate keys in the map, ignore all other keys for now - iter = mTranslateKeyMap.find(os_key); + auto iter = mTranslateKeyMap.find(os_key); if (iter == mTranslateKeyMap.end()) { //LL_WARNS() << "Unknown virtual key " << os_key << LL_ENDL; @@ -220,17 +212,9 @@ BOOL LLKeyboard::translateKey(const U16 os_key, KEY *out_key) } } - -#if LL_SDL -U32 LLKeyboard::inverseTranslateKey(const KEY translated_key) -{ - std::map<KEY, U32>::iterator iter; -#else -U16 LLKeyboard::inverseTranslateKey(const KEY translated_key) +LLKeyboard::NATIVE_KEY_TYPE LLKeyboard::inverseTranslateKey(const KEY translated_key) { - std::map<KEY, U16>::iterator iter; -#endif - iter = mInvTranslateKeyMap.find(translated_key); + auto iter = mInvTranslateKeyMap.find(translated_key); if (iter == mInvTranslateKeyMap.end()) { return 0; |