Asymmetric mouse movement in DGA2 mode

J. Christopher Pereira kripper at
Tue Jun 4 03:44:51 CDT 2002


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

More information about the wine-devel mailing list