http://bugs.winehq.org/show_bug.cgi?id=10318
--- Comment #31 from Vitaliy Margolen vitaliy@kievinfo.com 2009-04-18 16:46:31 --- You really do not need to use DInput to get raw input events. They are all coming from x11drv (see queue_raw_mouse_message). I can think of 2 ways to do it the "right way": 1. Register raw event receivers in x11.drv. And send raw events directly from there. 2. Make wineserver dispatch raw events.
I think 1) might be enough. But might not.
Don't want to even comment much on your patch - it has lots of problems: - Not all platforms support nameless unions - You not supposed to call vtbl methods directly but use functions instead (ex: m_mouse->lpVtbl->GetDeviceState() should be IDirectInputDevice_GetDeviceState(m_mouse,...) - You don't handle unregistering raw input events, destroying thread. BTW what do you need thread for? - All public declarations should go into header