diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-12-12 16:13:23 -0800 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-12-12 16:13:23 -0800 |
commit | 90b8fb07ccd46bd18f3629ae2ec04a47312b41cb (patch) | |
tree | 2e0a016cf2a0a3a869086dbde4e2f372bfe3f2c1 /indra/llwindow/llwindowsdl.cpp | |
parent | e826cbd90750fd38565e4e44390948f36254cf1f (diff) | |
parent | e859c3446b5c631fe0a9806434aa19b64a0d9113 (diff) |
Merge with latest from viewer-experience
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 6d593c807e..5f5baceef8 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1936,6 +1936,8 @@ void LLWindowSDL::gatherInput() break; } } + + updateCursor(); #if LL_X11 // This is a good time to stop flashing the icon if our mFlashTimer has @@ -2022,7 +2024,7 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty return sdlcursor; } -void LLWindowSDL::setCursor(ECursorType cursor) +void LLWindowSDL::updateCursor() { if (ATIbug) { // cursor-updating is very flaky when this bug is @@ -2030,11 +2032,11 @@ void LLWindowSDL::setCursor(ECursorType cursor) return; } - if (mCurrentCursor != cursor) + if (mCurrentCursor != mNextCursor) { - if (cursor < UI_CURSOR_COUNT) + if (mNextCursor < UI_CURSOR_COUNT) { - SDL_Cursor *sdlcursor = mSDLCursors[cursor]; + SDL_Cursor *sdlcursor = mSDLCursors[mNextCursor]; // Try to default to the arrow for any cursors that // did not load correctly. if (!sdlcursor && mSDLCursors[UI_CURSOR_ARROW]) @@ -2042,9 +2044,9 @@ void LLWindowSDL::setCursor(ECursorType cursor) if (sdlcursor) SDL_SetCursor(sdlcursor); } else { - llwarns << "Tried to set invalid cursor number " << cursor << llendl; + llwarns << "Tried to set invalid cursor number " << mNextCursor << llendl; } - mCurrentCursor = cursor; + mCurrentCursor = mNextCursor; } } |