Re: Re: mouse cursor problems
Nadav Frum <[email protected]>
| Newsgroups | gmane.comp.emulators.winex.devel |
|---|---|
| Message-ID | <Pine.LNX.4.44_heb2.10.0402151359530.13993-100000@localhost.localdomain> |
On Sat, 14 Feb 2004, Ove Kaaven wrote:
> Interesting. So some games don't call it? But are you sure exclusive
> mode is the default cooperative level? It would seem odd to me if it
> was.
>
> In fact, on this page, it says that background and nonexclusive is the
> default:
> http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx8_c/directx_cpp/input_ovusingdevices_1ol0.asp
You are right. I was fixing the problem quickly and did not fully
investigate the dinput spec. We must be true to the spec.
DISCL_NONEXCLUSIVE it is.
> The defaults could probably also be set in alloc_device instead of
> explicitly checking in dinput_window_check. Though then the app's bad
> behaviour wouldn't be warned about, but since that page does say that a
> default setting is provided, perhaps it doesn't need to be something to
> be warned about anyway.
>From the WineX code I see that alloc_device is called when the mouse
device is created. We can set the default cooperative level for this new
device at this time. However, we also need a window handle and this
window may be unknown or even non-existent at the mouse device creation time.
It is the absence of a window handle that prompted me to call
SetCooperativeLevel. And the cooperative level is not relevant in the absence
of a window to give it context. Perhaps we should do this
"window check" automatically when data is requested from the mouse device.
I am not dogmatic about the warning. However, using a mouse without
associating it with a window is bad programming. The warning is written
once only. It can serve as an indication that the game being run
may be buggy.
On Sat, 14 Feb 2004, Gregory S. Hayes wrote:
> I used the patch with the CVS version of winex and replaced the
> libdinput.so from 3.2.1 with the new build. I included some additional
> debug lines. It looks likeit has the absolute vs. relative position
> issue fixed, but the cursor sill is constantly snapping back to the
> center (as opposed to the upper left from before the patch).
This was never an absolute vs. relative issue. Symptom 3 is the
unnecessary warping which I wrote about on 9 February 2004. This is now a
common problem and I have outlined how to solve it. You need not bother
with the debugging messages. Manually disable warping and you will see
the mouse behaving correctly. This is a bad solution because people
playing a 3D game will find themselves unable to maneuver once inside the
game.
Nadav Frum
----------