Re: Re: mouse cursor problems

Nadav Frum <[email protected]>
Newsgroups gmane.comp.emulators.winex.devel
Message-ID <Pine.LNX.4.44_heb2.10.0402141327410.19638-200000@localhost.localdomain>
On Thu, 12 Feb 2004, Gregory S. Hayes wrote:

> Thanks for pointing me in the right direction. As the game I am using
> was reported to work in 3.1, I took a look at the dlls/dinput/mouse code
> and diffed the 3.1 branch to the current HEAD in CVS. I don't know
> enough about the code to attempt a patch, but it appears that the "if
> (wparam == WM_MOUSEMOVE) {" block is the right place to look. I
> espically liked the comment: "/* Relative mouse input with absolute
> mouse event : the real fun starts here... */" :)

I attached a small patch which you can apply to the CVS WineX.  It 
corrects a particular problem with the Roller Coaster game.  It is a 
general patch in the sense that it is IMO in line with the dinput 
specs.  With this patch you can proudly join the group of users who wish to
have "Symptom 3" (unnecessary warping) fixed.

Nadav Frum
----------

_______________________________________________
winex-devel mailing list
[email protected]
http://lists.transgaming.org/cgi-bin/mailman/listinfo/winex-devel
winex-20040214-rollercoaster_tycoon_2.patch (text/plain, 766 B)
--- winex-20040117.new/dlls/dinput/mouse/main.c.rt2	2003-12-27 11:22:09.000000000 +0200
+++ winex-20040117.new/dlls/dinput/mouse/main.c	2004-02-14 13:23:10.000000000 +0200
@@ -606,6 +606,15 @@
   RECT rect;
   DWORD centerX, centerY;
 
+  /* setting the cooperative level is advisable but not compulsory for a
+   * DirectX application.  However, it is the only way to get a handle on
+   * the window */
+  if (!This->win) {
+    WARN("cooperative level not previously set... using defaults\n");
+    SysMouseAImpl_SetCooperativeLevel((LPDIRECTINPUTDEVICE8A)This, (HWND) 0,
+					DISCL_FOREGROUND | DISCL_EXCLUSIVE);
+  }
+
   /* make sure the window hasn't moved */
   GetWindowRect(This->win, &rect);
   centerX = (rect.right  - rect.left) / 2;
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.