Mouse warping, toggle option

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
phormix
Newbie
Newbie
Posts: 1
Joined: Sun Jun 01, 2008 12:30 am

Mouse warping, toggle option

Post by phormix »

One of the nagging issues that has been around for awhile with wine is "mouse warping"

In some cases it doesn't place nice with the house environment, in other cases it doesn't play nice with the game, and overall it's a bit of an annoyance.

Would it be possible to introduce an option to wine that would allow one to select whether warping is used (maybe a checkbox for "Disable mouse warping").

As it is, quite a few older games don't work without it (for myself the current game-of-note is Dungeon Keeper 2), and using the native dinput.dll to avoid the issues then voids any constraints to keep the mouse pointer within the app window (the mouse works, but it exits the window before the in-game cursor does, making outlying screen areas unreachable).
David Gerard

Mouse warping, toggle option

Post by David Gerard »

2008/6/1 phormix <[email protected]>:
Would it be possible to introduce an option to wine that would allow one to select whether warping is used (maybe a checkbox for "Disable mouse warping").
As it is, quite a few older games don't work without it (for myself the current game-of-note is Dungeon Keeper 2), and using the native dinput.dll to avoid the issues then voids any constraints to keep the mouse pointer within the app window (the mouse works, but it exits the window before the in-game cursor does, making outlying screen areas unreachable).
FWIW, I notice that the Wine conformance tests use mouse warping - so
presumably it *should* work properly. Are there filed bugs for the
cases where it doesn't?


- d.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Mouse warping, toggle option

Post by vitamin »

phormix wrote:Would it be possible to introduce an option to wine that would allow one to select whether warping is used (maybe a checkbox for "Disable mouse warping").
It won't help in lots of cases. If you talking about games based on Quake engine - that option would be useless.

ID's code has a bug in it - it initializes DInput mouse in exclusive mode without specifying the window. This is wrong and it fails. However code ignores the error and continues on using mouse in default mode (background non-exclusive).

The problem is - Wine have to have window to be able to warp mouse inside of it. Forcing or not - no window - no warping.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Mouse warping, toggle option

Post by vitamin »

David Gerard wrote:FWIW, I notice that the Wine conformance tests use mouse warping - so
presumably it *should* work properly.
No it doesn't work in all cases. DInput should _NOT_ warp mouse in any case. Wine's DInput does to not "loose" mouse pointer. So there are really two classes of bugs:
- bug 6971 where Wine doesn't warp and pointer escapes
- bug 13290 where Wine does warp but applications reads absolute pointer coordinates and always displays pointer in one place.

Aside from those - there are number of derivative bugs where warping badly affects games and their cursor is "slow". And so on...
superevilspacemonkey
Newbie
Newbie
Posts: 1
Joined: Mon Jun 23, 2008 5:00 am

Mouse Warping - please help!

Post by superevilspacemonkey »

Hi guys, I'm a bit of a newb so please excuse 'obvious' questions.

I think I'm experiencing mouse-warping problems with MOHAA (which I think runs on the quake engine by id):
The game starts up and runs fine (fullscreen mode), however the mouse seems to be locked in an imaginary "window", i.e. it seems to be limited to a border.

I have not yet tried to overide any dll's (frankly i'm not sure where to start).


Firstly is this a "mouse warping" issue?
Is there a workaround (or something obvious) i'm missing?

Other than the above I am very pleasantly surprised by the improved performance (running Win games on Linux is better than running them in Win!!!!); this goes for Abe's oddysey, Unreal Tournament and MOHAA (barring this issue).

My distro is OpenSuse 10.3 (KDE), and I have the legacy NVidia drivers installed and working(?) for my Riva TNT2
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Mouse Warping - please help!

Post by vitamin »

superevilspacemonkey wrote:I think I'm experiencing mouse-warping problems with MOHAA (which I think runs on the quake engine by id):
The game starts up and runs fine (fullscreen mode), however the mouse seems to be locked in an imaginary "window", i.e. it seems to be limited to a border.
Yes this is classic description for the bug 6971
magmp
Level 1
Level 1
Posts: 8
Joined: Thu Jun 26, 2008 6:14 pm

Post by magmp »

Yes. Vitamin is right. But there is an option to toggle mouse warp . See Gothic 3 on AppDB. I gave there a solution how to do it. Its just a guide, all credits goes to man who wrote a patch.
Locked