Rémi Bernon : dinput: Increase device buffer size to 1024.

Alexandre Julliard julliard at winehq.org
Mon Feb 17 15:42:16 CST 2020


Module: wine
Branch: master
Commit: 50440e28bb1611377df841ee267c0fa7bef515cc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=50440e28bb1611377df841ee267c0fa7bef515cc

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Fri Feb 14 11:01:39 2020 +0100

dinput: Increase device buffer size to 1024.

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 b778f6b3ea..8c5aa31883 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -1398,7 +1398,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,




More information about the wine-cvs mailing list