We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4000 - SDL2 on raspberry: mouse displayed at 0,0 after SDL_ShowCursor
Summary: SDL2 on raspberry: mouse displayed at 0,0 after SDL_ShowCursor
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.7
Hardware: ARM Linux
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-14 12:48 UTC by Laurent Merckx
Modified: 2017-12-19 19:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Merckx 2017-12-14 12:48:57 UTC
(already mention on the forum ... but its place is here, I think)

I have a problem with the SDL_ShowCursor method on Raspberry.

Depending on the context, my application hides or show the mouse cursor with SDL_ShowCursor.
But when calling SDL_ShowCursor(true), the cursor is displayed at 0,0 (and not at last position).

After debugging sources by myself, it seems that the problem is in SDL_rpimouse.c - RPI_ShowCursor:

vc_dispmanx_rect_set( &dst_rect, 0, 0, curdata->w, curdata->h);
should be
vc_dispmanx_rect_set( &dst_rect, mouse->x, mouse->y, curdata->w, curdata->h);

For me, it solves the problem.
Comment 1 Sam Lantinga 2017-12-19 19:17:54 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/3ec03f35f3b9