Mouse not warping properly in full screen mode
thunder.m at czela.net
Sun Feb 18 16:15:21 CST 2007
Hi similar bug with mouse in TES IV: Oblivion was introduced in wine 0.9.31
Raf Geens napsal(a):
> I'm new to Wine and DirectX development, but I've dug around a bit in
> the Wine source code to get Determinance, a sword-fighting game to
> work. I've submitted an entry for it to the application database.
> The main problem I had was with strange mouse behaviour in full screen
> mode. The player can rotate his character by holding down the right
> mouse button and moving the mouse. In Windows, this allows you to turn
> as much as you want. In Wine, the rotation stops at a certain point.
> You can't see the cursor, but I'm fairly certain the point at which
> movement stops is when the cursor hits the edge of the screen.
> When this has happened and you return to the main menu, it can occur
> that for example the cursor can't reach the top part of the screen
> anymore. It's as if an invisible rectangle that keeps the cursor
> inside the screen has moved. In such a case, moving the cursor all the
> way to the bottom and back up again restores normal behaviour.
> I've isolated the problem to the following line in dlls/dinput/mouse.c :
> This->need_warp = (pt.x || pt.y) && dwCoop & DISCL_EXCLUSIVE;
> Changing it to This->need_warp = TRUE; as a quick test makes the mouse
> behave correctly.
> I've read about the mouse warping hack over here:
> http://www.kernel-traffic.com/wine/wn20040618_227.html#2 . Inserting a
> TRACE statement displaying the variables in that line of code revealed
> - it is only executed in full screen mode, and not in windowed mode
> - dwCoop is DISCL_NOWINKEY , causing the expression to evaluate to false.
> So it seems the DISCL_EXCLUSIVE constraint is too restrictive. Reading
> about the meanings of the dwCoop values at msdn (
> http://tinyurl.com/2lmgbw ), I'm guessing the Determinance developers
> might not have entirely been following the rules. However, it works
> properly on Windows. Would it be acceptable to drop the
> DISCL_EXCLUSIVE constraint?
> Raf Geens
More information about the wine-devel