* Draw mouse cursor on screen. */
| 1069 | * Draw mouse cursor on screen. |
| 1070 | */ |
| 1071 | void OpenGLBackend::DrawMouseCursor() |
| 1072 | { |
| 1073 | if (!this->cursor_in_window) return; |
| 1074 | |
| 1075 | /* Draw cursor on screen */ |
| 1076 | _cur_dpi = &_screen; |
| 1077 | for (const auto &cs : this->cursor_sprites) { |
| 1078 | /* Sprites are cached by PopulateCursorCache(). */ |
| 1079 | if (this->cursor_cache.Contains(cs.image.sprite)) { |
| 1080 | const OpenGLSprite *spr = this->cursor_cache.Get(cs.image.sprite).get(); |
| 1081 | |
| 1082 | this->RenderOglSprite(spr, cs.image.pal, |
| 1083 | this->cursor_pos.x + cs.pos.x + UnScaleByZoom(spr->x_offs, _gui_zoom), |
| 1084 | this->cursor_pos.y + cs.pos.y + UnScaleByZoom(spr->y_offs, _gui_zoom), |
| 1085 | _gui_zoom); |
| 1086 | } |
| 1087 | } |
| 1088 | } |
| 1089 | |
| 1090 | class OpenGLSpriteAllocator : public SpriteAllocator { |
| 1091 | public: |
no test coverage detected