Hi:
I patched 'windows/x11drv/event.c' to run Starcraft in DGA2 mode.
In DGA2 I noticed that the mouse movement is't symmetric, ie: mouse speed when moving left/up < mouse speed when moving right/down.
To fix this, I modified 'dlls/x11drv/mouse.c', adding:
void X11DRV_DGAMotionEvent( HWND hwnd, XDGAMotionEvent *event ) { update_key_state( event->state ); // HACK: fix asymmetric mouse motion if(event->dx < 0) event->dx *= 2; if(event->dy < 0) event->dy *= 2; send_mouse_event( hwnd, MOUSEEVENTF_MOVE, event->dx, event->dy, 0, event->time ); } (just empirical values)
Why does this happen? Is there any cleaner solution?
Observation: in 'send_mouse_event' says: "/* Relative mouse movements seem not to be scaled as absolute ones */"
BTW, in this application, when the mouse reaches the border of the screen (moving the mouse cursor out of the window), the view is supposed to be scrolled in that direction.
This doesn't work in DGA mode, but works when not using DGA
Any idea?
System: latest winex CVS version + XFree86 4.2.0
"J. Christopher Pereira" a écrit :
System: latest winex CVS version + XFree86 4.2.0
Since you're using WineX, please report to it to Transgaming. OTOH, you can try the latest Wine CVS (from winehq.com), and if your issue is also present in it, then report it.
Vincet
On Tue, 2002-06-04 at 11:01, Vincent Béron wrote:
"J. Christopher Pereira" a écrit :
System: latest winex CVS version + XFree86 4.2.0
Since you're using WineX, please report to it to Transgaming. OTOH, you can try the latest Wine CVS (from winehq.com), and if your issue is also present in it, then report it.
The same goes for wine.
I downloaded the latest wine CVS from winehq and patched 'dlls/x11drv/event.c' for processing mouse + keyboard events in DGA mode.
The movement is still asymmetric :-(