Skip to content
Snippets Groups Projects
Commit ddaec889 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix build errors in macos keyboard code

parent c83a9a46
Branches
No related tags found
No related merge requests found
...@@ -133,8 +133,7 @@ LLKeyboardMacOSX::LLKeyboardMacOSX() ...@@ -133,8 +133,7 @@ LLKeyboardMacOSX::LLKeyboardMacOSX()
mTranslateKeyMap[0x7e] = KEY_UP; mTranslateKeyMap[0x7e] = KEY_UP;
// Build inverse map // Build inverse map
std::map<U32, KEY>::iterator iter; for (auto iter = mTranslateKeyMap.begin(); iter != mTranslateKeyMap.end(); iter++)
for (iter = mTranslateKeyMap.begin(); iter != mTranslateKeyMap.end(); iter++)
{ {
mInvTranslateKeyMap[iter->second] = iter->first; mInvTranslateKeyMap[iter->second] = iter->first;
} }
...@@ -154,7 +153,7 @@ LLKeyboardMacOSX::LLKeyboardMacOSX() ...@@ -154,7 +153,7 @@ LLKeyboardMacOSX::LLKeyboardMacOSX()
mTranslateNumpadMap[0x4c] = KEY_PAD_RETURN; // keypad enter mTranslateNumpadMap[0x4c] = KEY_PAD_RETURN; // keypad enter
// Build inverse numpad map // Build inverse numpad map
for (iter = mTranslateNumpadMap.begin(); iter != mTranslateNumpadMap.end(); iter++) for (auto iter = mTranslateNumpadMap.begin(); iter != mTranslateNumpadMap.end(); iter++)
{ {
mInvTranslateNumpadMap[iter->second] = iter->first; mInvTranslateNumpadMap[iter->second] = iter->first;
} }
...@@ -279,7 +278,7 @@ MASK LLKeyboardMacOSX::currentMask(BOOL for_mouse_event) ...@@ -279,7 +278,7 @@ MASK LLKeyboardMacOSX::currentMask(BOOL for_mouse_event)
void LLKeyboardMacOSX::scanKeyboard() void LLKeyboardMacOSX::scanKeyboard()
{ {
S32 key; U32 key;
for (key = 0; key < KEY_COUNT; key++) for (key = 0; key < KEY_COUNT; key++)
{ {
// Generate callback if any event has occurred on this key this frame. // Generate callback if any event has occurred on this key this frame.
......
...@@ -126,8 +126,8 @@ void setupInputWindow(NSWindowRef window, GLViewRef view); ...@@ -126,8 +126,8 @@ void setupInputWindow(NSWindowRef window, GLViewRef view);
// These are all implemented in llwindowmacosx.cpp. // These are all implemented in llwindowmacosx.cpp.
// This is largely for easier interop between Obj-C and C++ (at least in the viewer's case due to the BOOL vs. BOOL conflict) // This is largely for easier interop between Obj-C and C++ (at least in the viewer's case due to the BOOL vs. BOOL conflict)
bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask); bool callKeyUp(NSKeyEventRef event, unsigned int key, unsigned int mask);
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask); bool callKeyDown(NSKeyEventRef event, unsigned int key, unsigned int mask);
void callResetKeys(); void callResetKeys();
bool callUnicodeCallback(wchar_t character, unsigned int mask); bool callUnicodeCallback(wchar_t character, unsigned int mask);
void callRightMouseDown(float *pos, unsigned int mask); void callRightMouseDown(float *pos, unsigned int mask);
......
...@@ -197,7 +197,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks, ...@@ -197,7 +197,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks,
// These functions are used as wrappers for our internal event handling callbacks. // These functions are used as wrappers for our internal event handling callbacks.
// It's a good idea to wrap these to avoid reworking more code than we need to within LLWindow. // It's a good idea to wrap these to avoid reworking more code than we need to within LLWindow.
bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask) bool callKeyUp(NSKeyEventRef event, unsigned int key, unsigned int mask)
{ {
mRawKeyEvent = event; mRawKeyEvent = event;
bool retVal = gKeyboard->handleKeyUp(key, mask); bool retVal = gKeyboard->handleKeyUp(key, mask);
...@@ -205,7 +205,7 @@ bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask) ...@@ -205,7 +205,7 @@ bool callKeyUp(NSKeyEventRef event, unsigned short key, unsigned int mask)
return retVal; return retVal;
} }
bool callKeyDown(NSKeyEventRef event, unsigned short key, unsigned int mask) bool callKeyDown(NSKeyEventRef event, unsigned int key, unsigned int mask)
{ {
mRawKeyEvent = event; mRawKeyEvent = event;
bool retVal = gKeyboard->handleKeyDown(key, mask); bool retVal = gKeyboard->handleKeyDown(key, mask);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment