[SDL] SDL_Video - Help with fullscreen, suppressed mouse
david at olofson.net
Fri Sep 8 18:25:37 PDT 2006
On Thursday 07 September 2006 19:25, Torsten Giebl wrote:
> As in my last email on my system with DirectX everything works okay.
> But when using GDI SDL_ShowCursor when switching between ENABLED
> /DISABLED or vice versa it centers the MouseCursor in Fullscreen
> Mode and as he uses in his mainloop MouseCursor SwitchOn/Off every
> loop SDL always centers the MouseCursor before asking for Events.
Hmm... Maybe this is related to the problem I'm having in a GUI
toolkit of mine...? (EBGUI; GUI toolkit implemented in EEL over SDL
The offending widget can be dragged and scaled by moving the mouse
along the ruler and perpendicular to the ruler, respectively. As it's
(more or less) endless in both dimensions, the widget hides the
cursor and makes use of SDL_WarpMouse() to get relative mouse
movement while dragging/scaling.
My problem is that if I'm moving the mouse as I grab the ruler (which
results in the widget hiding the cursor and grabbing input), I often
get a huge jump. IIRC, this is actually passed as a number of move
events, apparently clamped to the window/screen size.
This only happens if the cursor is moving at the moment the widget
hides it, as far as I can tell.
If I disable the cursor hiding, it works perfectly every time - well,
except for that silly looking cursor jittering about in the middle of
the window. :-)
> I am interested if other people with Windows and using GDI with SDL
> could reproduce this problem.
The problem I'm seeing appears on X11/Linux as well. Also, it happens
in windowed mode as well as fullscreen mode, at least on Linux.
Haven't tried it on OS X yet.
//David Olofson - Programmer, Composer, Open Source Advocate
.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
'-- http://www.reologica.se - Rheology instrumentation --'
More information about the SDL