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:
Rémi Bernon 2021-11-08 09:34:57 +01:00 committed by Alexandre Julliard
parent 20f1a677b6
commit 53fcfe3834
2 changed files with 3 additions and 2 deletions

View File

@ -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,

View File

@ -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);
}