Re: Re: mouse cursor problems

"Gregory S. Hayes" <[email protected]>
Newsgroups gmane.comp.emulators.winex.devel
Message-ID <1078512224.1233.4.camel@icebreaker>
I applied this patch and it worked!! Thanks Nadav!

Greg
-

On Thu, 2004-02-26 at 02:42, Nadav Frum wrote:
> On Tue, 24 Feb 2004, Gavriel State wrote:
> 
> > We've been aware of a range of input related issues for years, and have
> > been working to resolve them one by one, as we've worked on individual
> > games.
> > 
> > While we considered an XFree extension at one point, the process required
> > to get that in seemed like it would be slow, and would not fulfill the
> > immediate needs that we had to deal with certain aspects of the problem.
> > 
> > A look at
> > http://cvs.transgaming.org/cgi-bin/viewcvs.cgi/winex/dlls/dinput/mouse/main.c
> > will show that we've far from ignored dinput problems, with dozens of commits
> > to address various issues.
> > 
> > This issue that has come up recently is in part a regression, and in
> > part is touching areas of the dinput code that we simply haven't looked
> > at in some time.It sounds like you and Ove are well on a way to a
> > fix that makes sense, so with luck we can see this fully addressed
> > soon.
> > 
> > Take care,
> > -Gav
> 
> I would like to suggest the following solution to the cursor problem:
> 
> --- winex-20040221.new/dlls/dinput/mouse/main.c.hwcursor	2004-02-21 09:14:30.000000000 +0200
> +++ winex-20040221.new/dlls/dinput/mouse/main.c	2004-02-26 09:31:04.000000000 +0200
> @@ -647,11 +656,21 @@
>  
>  static void dinput_check_warp(SysMouseAImpl* This)
>  {
> +  CURSORINFO pci;
> +  DWORD current = GetCurrentTime(); 
> +
>    /* try to recover from lost warp events by retrying
>     * the warp if no event received within 20ms */
> -  if (This->need_warp == WARP_STARTED &&
> -      ((GetCurrentTime() - This->warp_time) > 20)) {
> -    This->need_warp = WARP_NEEDED;
> +  if ((This->need_warp == WARP_STARTED && ((current - This->warp_time) > 20)) ||
> +      This->need_warp == WARP_NEEDED) {
> +    /* find out whether the cursor is being drawn by the o/s */
> +    GetCursorInfo(&pci);
> +    if (pci.flags && pci.hCursor) {
> +      This->warp_time = current;
> +      This->need_warp = WARP_STARTED; 
> +    }
> +    else
> +      This->need_warp = WARP_NEEDED;
>    }
>  }
>  
> I have not tested this patch.  Please post the results of your 
> (Transgamers) own testing.
> 
> On Tue, 24 Feb 2004, Gregory S. Hayes wrote:
>                                                                                 
> > I am also confused. It seems like it would be reasonable to fix given
> > that it was working before in winex (at least for RollerCoasterTycoon2.)
> 
> The warping of the cursor exists in WineX for quite some time.  And to my 
> knowledge there has never been a mechanism to disable this warping.  I am
> curious as to how this game worked on previous versions of WineX.  Is it
> possible that the warping was disabled by accident? 
> 
> Regards,
> 
> Nadav Frum
> ----------
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.