[SDL] Re: SDL_WarpMouse() and SDL_ShowCursor()
rpmcruz at clix.pt
Mon Nov 28 07:23:49 PST 2005
Em Segunda 28 Novembro 2005 13:45, o David Olofson escreveu:
> On Monday 28 November 2005 10.51, Christian Walther wrote:
> > Here on Mac OS X (Cocoa), SDL_WarpMouse() does affect hidden mouse
> > cursors (grabbed or not), and that makes perfect sense to me. After
> > all, even though invisible, the cursor still has a position that is
> > affected by mouse movements, is reported in mouse events, and can be
> > read using SDL_GetMouseState() - so one should also be able to set
> > it using SDL_WarpMouse(). If that's not the case on X, I'd consider
> > that a bug (unless the other three properties aren't satisfied there
> > either).
> Actually, I'd also consider the X behavior a bug, althogh, if I
> stretch (far) I can sort of understand why someone might have thought
> it doesn't make sense to move an invisible pointer.
Making the system mouse cursor invisible and blit some image in its place is
quite a common practice in games. These developers expect the mouse warpping
if they ask to, so, unless it breaks something, I think this should implement
for invisible cursors as well.
> Either way, this is pretty much irrelevant, as this is apparently the
> way some X implementations do it, so we'll either have to accept that
> some SDL applications break on some/most/all X targets, or SDL has to
> work around it.
> //David Olofson - Programmer, Composer, Open Source Advocate
Real Time, adj.:
Here and now, as opposed to fake time, which only occurs there
More information about the SDL