[hatari-devel] Mouse pointer problem

Thomas Huth huth at users.berlios.de
Wed Dec 30 14:05:08 CET 2009


On Wed, 30 Dec 2009 13:29:36 +0100 (CET)
LAURENT SALLAFRANQUE <laurent.sallafranque at arkea.com> wrote:

> I don't agree with you here.
> 
> It seems to me there's an offset with the mouse pointer when it first
> appears.
> 
> As long as I "recalibrate" the mouse by moving the mouse pointer to
> each border of the screen, the mouse reacts perfectly.
> 
> When I move the mouse pointer on the left border, it continues to
> "move" inside hatari for a few seconds before displaying the linux
> (or windows) pointer.
> 
> The "offset" becomes null in this case and after, when I enter again
> into the hatari window, everything is OK.
> 
> It looks as if the ST borders are taken into account when hatari
> starts in falcon mode for copmputing of the mouse pointer first
> position.

The problem in Falcon mode are most likely not the ST borders, but the
fact that it switches the resolution a couple of times until the
Desktop is reached.

It normally works like this (in ST mode): During Reset_Cold() we set
the host mouse pointer to the middle of the screen, and when the ST has
finally booted, the ST mouse pointer is roughly in sync with the host
mouse pointer since it also appears in the middle of the screen.

Now in Falcon mode, we also set the host mouse pointer to the middle of
the screen, but the Falcon TOS then switches the resolution a couple of
times until the desktop has been reached, so the Falcon mouse pointer
is not in sync with the host mouse pointer anymore.

You could try the following:

1) For debugging, change the "SDL_ShowCursor(SDL_DISABLE)" to
"SDL_ShowCursor(SDL_ENABLE)" in screen.c, then you can see the host
mouse pointer, too.

2) Try to add something like "Main_WarpMouse(sdlscrn->w/2,
 sdlscrn->h/2)" at the end of HostScreen_setWindowSize() in
falcon/hostscreen.c to see whether this helps a little bit.

>
> What is mouse grab supposed to do (AltGr + M)? 
> I've done the test under windows, but I detected to change.
> 

That keyboard shortcut should lock the mouse pointer within the Hatari
window. Have a look at your hatari.cfg to see whether it has been
configured to a different key.

 Thomas




More information about the hatari-devel mailing list