summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video/opengl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video/opengl.cpp b/src/video/opengl.cpp
index e74ab7b5b..c346fd152 100644
--- a/src/video/opengl.cpp
+++ b/src/video/opengl.cpp
@@ -1060,9 +1060,9 @@ void OpenGLBackend::DrawMouseCursor()
/* Sprites are cached by PopulateCursorCache(). */
if (this->cursor_cache.Contains(sprite)) {
- const Sprite *spr = GetSprite(sprite, ST_NORMAL);
+ Sprite *spr = this->cursor_cache.Get(sprite);
- this->RenderOglSprite((OpenGLSprite *)this->cursor_cache.Get(sprite)->data, _cursor.sprite_seq[i].pal,
+ this->RenderOglSprite((OpenGLSprite *)spr->data, _cursor.sprite_seq[i].pal,
_cursor.pos.x + _cursor.sprite_pos[i].x + UnScaleByZoom(spr->x_offs, ZOOM_LVL_GUI),
_cursor.pos.y + _cursor.sprite_pos[i].y + UnScaleByZoom(spr->y_offs, ZOOM_LVL_GUI),
ZOOM_LVL_GUI);