Re: Re: mouse cursor problems
Nadav Frum <[email protected]>
| Newsgroups | gmane.comp.emulators.winex.devel |
|---|---|
| Message-ID | <Pine.LNX.4.44_heb2.10.0403111457210.10492-100000@localhost.localdomain> |
On Thu, 11 Mar 2004, Ove Kaaven wrote: > 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. Transgamers reading this post may conclude that I wrote this in a rage. This is not the case. I find your conduct deplorable. Such an organized response provided so quickly looks to me like an ambush. I cannot conceive why you would send a private patch to Gregory or why he would choose to keep it a secret. Why would you choose to keep it a secret from me? > 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. Organized but misguided! Setting the cooperative level to DISCL_EXCLUSIVE is a way to disable the system cursor through dinput. However, the system cursor may be disabled through d3d8, d3d9 or user32. None of these options affects the outcome of your WARP_CONDITION macro AFAIK. My patch was designed to handle such situations. It adds functionality where none existed before and it is more complete than your solution. Some games may switch the system cursor on and off and thereby create conditions identical to those necessitating a disabled warp. I have considered a solution to this problem. Your solution does nothing for this additional complication. > 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)) Any switches from DISCL_NONEXCLUSIVE to DISCL_EXCLUSIVE and back that affect the drawing of the cursor should be recorded with user32. My patch will pick-up those changes. One can tweak the condition for disabling the warp. > 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. You have some chutzpah. I hope your attitude does not represent the attitude of Transgaming's management. Disgusted, Nadav Frum ----------