summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowsdl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r--indra/llwindow/llwindowsdl.cpp14
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;
}
}