Re: Re: mouse cursor problems
Nadav Frum <[email protected]>
| Newsgroups | gmane.comp.emulators.winex.devel |
|---|---|
| Message-ID | <Pine.LNX.4.44_heb2.10.0403131150480.11382-100000@localhost.localdomain> |
Shortly before you wrote this letter I was sent a private letter from
Gavriel. I will respond to it early next week.
In a letter I sent Gavriel shortly after he invited me to produce a
solution to the cursor problem, I emphasized that it is my intention to
avoid doing Transgaming any publicity damage. I asked him to keep a close
eye on the goings-on on this forum.
I think it is best that we do not pursue this topic any further on this
forum. My response was necessary in view of the public statements you
made. I believe I have made my point.
Nadav Frum
----------
P.S. Ove's recent changes to the CVS IMO do address the cursor
problems for Roller Coaster Tycoon 2. Transgamers wishing to play
this particular game no longer require the application of my patch.
On Fri, 12 Mar 2004, Ove Kaaven wrote:
> tor, 11.03.2004 kl. 14.58 skrev Nadav Frum:
> > 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.
>
> Not meant as such. I had just cometo the conclusion I wrote about the
> morning I wrote it (have worked on other things (the ALSA driver), so I
> didn't complete the patch review before that). Then when I saw your
> email later, I replied to it to explain what I had decided. It certainly
> wasn't meant as 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?
>
> I was just trying to get some questions answered. He had not responded
> to an earlier email, so I thought perhaps a private mail worked better.
> Besides, I was somewhat unsure about the merit of the patch I sent him.
>
> > > After some thought, I've decided not to use your proposed patch because
> > > it willdo 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 positionseen 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.
>
> That's right. But all games that don't use exclusive mode are likely to
> just use the cursor as a pointing device, in which case warp will seldom be
> needed. This condition is not bulletproof, so I did leave the path open
> to your technique in my mail *if you improved it as outlined*. The idea
> was that if you could prove that there are any twitch games that actually
> use nonexclusive mode, you would certainly have a good case for getting
> a patch implementing your technique in. Even if not, it would have been
> considered anyway, as long as it was done properly.
>
> > 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 andthereby 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.
>
> I've explained to you what you have to do to handle that problem. You
> just have to fix those hidden/shown transitions. I didn't blankly
> reject the idea behind your technique, just your particular patch, since
> it had problems. And where avoidable, we prefer to not add too many known
> problems to CVS. I can see how your technique would help more games than
> my patch, so if you would address my concerns and show me an improved
> patch, I'd be happy to apply it.
>
> > > 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.
>
> I'm not sure what you mean here. WARP_CONDITION will also pick up such
> changes in the same way. Besides, the device is likely to be unacquired
> before changing the cooperative level, so it's not a big issue.
>
> > One can tweak the condition for disabling the warp.
>
> Yes. And I'm open for doing so.
>
> > > 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.
>
> Not really. I have a more technically-oriented attitude; in
> particularly, I'm pretty particular to patch quality. Even if the idea
> behind it is sound, I need a proper implementation of it before I'm
> happy.
>
> I hope that clears things up. I'm not too attached to my own work, you
> can reverse my change if you like. Just fix the issues I've raised, and
> I'll apply your patch. Deal?