Re: Re: mouse cursor problems
Ove Kaaven <[email protected]>
| Newsgroups | gmane.comp.emulators.winex.devel |
|---|---|
| Organization | TransGaming Technologies Inc |
| Message-ID | <1079008618.18054.413.camel@renegade> |
tor, 11.03.2004 kl. 12.04 skrev Nadav Frum: > On Wed, 10 Mar 2004, Gregory S. Hayes wrote: > > > I tested with Black and White, GTA Vice City, and Warcraft III. The > > mouse worked fine everywhere (and works in RT2). > > Good work! I think it is Transgaming's move now. Not necessarily. I sent Gregory Hayes a couple of questions and an experimental patch to try on March 2, in private mail. I still haven't got a reply. After some thought, I've decided not to use your proposed patch because it will do the wrong thing if a game hides and shows the mouse cursor arbitrarily. Because the warping code will continue to add offsets to the coordinates reported to the game even when the actual warp is temporarily disabled, the cursor position seen by the user and the position seen by the game may start differing in such a scenario. If you need to disable warp, you should do it via the WARP_CONDITION macro, so that the coordinate offsets are turned off too. But there's still a risk of the code getting confused when the cursor is shown and hidden if that's what triggers changes to WARP_CONDITION; more code would need to be added to handle those transitions. The patch I sent to Gregory Hayes avoids these issues by replacing WARP_CONDITION with: #define WARP_CONDITION(This) (!This->absolute && !(This->dwCoopLevel & DISCL_NONEXCLUSIVE)) but a solution based on GetCursorInfo instead of dwCoopLevel could be accepted if the coop level proves insufficient, if it's shown that the right thing will happen even if the mouse cursor is temporarily hidden by the game.