[PATCH] dinput: Increase device buffer size to 1024.

Rémi Bernon rbernon at codeweavers.com
Fri Feb 14 04:01:39 CST 2020


The buffer size was previously limited to 20 in:

  8d052561724f9c8d9e7770964bfaebdd01e98e60

Testing shows that it is somewhere around 1024 on Windows, and using a
smaller buffer causes some input data to be lost with high polling rate
mouses. It can be spotted in Wolfenstein II: New Colossus menus.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/dinput/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index d18292192a5..bcb893e6324 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -1400,7 +1400,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_SetProperty(
             EnterCriticalSection(&This->crit);
 
             This->buffersize  = pd->dwData;
-            This->queue_len = min(This->buffersize, 20);
+            This->queue_len = min(This->buffersize, 1024);
             HeapFree(GetProcessHeap(), 0, This->data_queue);
 
             This->data_queue = !This->queue_len ? NULL : HeapAlloc(GetProcessHeap(), 0,
-- 
2.25.0




More information about the wine-devel mailing list