summaryrefslogtreecommitdiff
path: root/src/surface/sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/surface/sdl.c')
-rw-r--r--src/surface/sdl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/surface/sdl.c b/src/surface/sdl.c
index 2a905f5..8908a21 100644
--- a/src/surface/sdl.c
+++ b/src/surface/sdl.c
@@ -636,8 +636,13 @@ sdl_cursor(nsfb_t *nsfb, struct nsfb_cursor_s *cursor)
nsfb_bbox_t fbarea;
if ((cursor != NULL) && (cursor->plotted == true)) {
+ nsfb_bbox_t loc_shift = cursor->loc;
+ loc_shift.x0 -= cursor->hotspot_x;
+ loc_shift.y0 -= cursor->hotspot_y;
+ loc_shift.x1 -= cursor->hotspot_x;
+ loc_shift.y1 -= cursor->hotspot_y;
- nsfb_plot_add_rect(&cursor->savloc, &cursor->loc, &redraw);
+ nsfb_plot_add_rect(&cursor->savloc, &loc_shift, &redraw);
/* screen area */
fbarea.x0 = 0;