dinput: Always call the device internal poll callback.
We normally should not peek messages here, but because of current winex11.drv design, we have to call MsgWaitForMultipleObjectsEx from time to time to pull keyboard or mouse events. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51956 Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
20f1a677b6
commit
53fcfe3834
|
@ -1535,10 +1535,9 @@ static HRESULT WINAPI dinput_device_Poll( IDirectInputDevice8W *iface )
|
|||
EnterCriticalSection( &impl->crit );
|
||||
if (!impl->acquired) hr = DIERR_NOTACQUIRED;
|
||||
LeaveCriticalSection( &impl->crit );
|
||||
if (hr != DI_OK) return hr;
|
||||
|
||||
if (impl->vtbl->poll) return impl->vtbl->poll( iface );
|
||||
return DI_OK;
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dinput_device_SendDeviceData( IDirectInputDevice8W *iface, DWORD size,
|
||||
|
|
|
@ -1430,6 +1430,8 @@ void check_dinput_events(void)
|
|||
* (for example Culpa Innata)
|
||||
* - some games only poll the device, and neither keyboard nor mouse
|
||||
* (for example Civilization: Call to Power 2)
|
||||
* - some games do not explicitly poll for keyboard events
|
||||
* (for example Morrowind in its key binding page)
|
||||
*/
|
||||
MsgWaitForMultipleObjectsEx(0, NULL, 0, QS_ALLINPUT, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue