http://bugs.winehq.org/show_bug.cgi?id=16822
Patrick Rudolph patrick1804@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |patrick1804@web.de
--- Comment #26 from Patrick Rudolph patrick1804@web.de 2011-05-16 12:41:01 CDT --- Regarding Frontlines 1.00 (UT3 mod), mouse isn't working at all ingame I found out, that the mouse is handled like this:
mouse_init();
...
while(1){
dinput:IDirectInputDevice2WImpl_SetCooperativeLevel( DISCL_FOREGROUND| DISCL_NONEXCLUSIVE )
input:SysMouseWImpl_Acquire <- queue is cleaned here !
dinput:IDirectInputDevice2WImpl_GetDeviceData <- queue is empty, return nothing
dinput:LL_hook_proc calling <- mouse hook, fills the queue dinput:dinput_mouse_hook dinput:queue_event
dinput:SysMouseWImpl_Unacquire
}
The basic problem is, that SysMouseWImpl_Acquire() clears the queue AND the mouse hook is processed after IDirectInputDevice2WImpl_GetDeviceData() every time.
In dinput/device.c : HRESULT WINAPI IDirectInputDevice2WImpl_Acquire(LPDIRECTINPUTDEVICE8W iface) uncommenting this lines fixes the problem, the game is working fine
//This->queue_head = This->queue_tail = This->overflow = 0;
better solution would be getting the mouse hook processed AFTER SysMouseWImpl_Acquire() and BEFORE IDirectInputDevice2WImpl_GetDeviceData() is called.