[PATCH] dinput: Increase MAX_JOYDEV to 1024.
As defined in drivers/input/input.c in the linux kernel, the highest number an evdev node can get assigned is 1023. Signed-off-by: Noor Schat <creeperlwd(a)gmail.com> --- dlls/dinput/joystick_linuxinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index e4f5db848c..f6b0331f1a 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -179,7 +179,7 @@ static const GUID DInput_Wine_Joystick_Constant_Part_GUID = { #define test_bit(arr,bit) (((BYTE*)(arr))[(bit)>>3]&(1<<((bit)&7))) -#define MAX_JOYDEV 64 +#define MAX_JOYDEV 1024 static int have_joydevs = -1; static struct JoyDev *joydevs = NULL; -- 2.21.0
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=52642 Your paranoid android. === debian9 (32 bit report) === dinput: keyboard.c:153: Test failed: Keyboard event not processed, skipping test === debian9 (32 bit WoW report) === dinput: keyboard.c:153: Test failed: Keyboard event not processed, skipping test
Hi Noor, Thanks for your patch. Out of curiosity are you encountering a practical issue with the current limit? It is very hard to really reach this limit. If there is a true use case for bumping it, I think other dinput code should get refactored. From a quick glance "find_joydevs()" naively tries to open MAX_JOYDEV count files (js0 to js1023). This feels quite wasteful to do so as most users would have only a handful joystick nodes or even 0. Thanks, Roderick On Tue, May 21, 2019 at 2:35 PM Noor Schat <creeperlwd(a)gmail.com> wrote:
As defined in drivers/input/input.c in the linux kernel, the highest number an evdev node can get assigned is 1023.
Signed-off-by: Noor Schat <creeperlwd(a)gmail.com> --- dlls/dinput/joystick_linuxinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dinput/joystick_linuxinput.c b/dlls/dinput/joystick_linuxinput.c index e4f5db848c..f6b0331f1a 100644 --- a/dlls/dinput/joystick_linuxinput.c +++ b/dlls/dinput/joystick_linuxinput.c @@ -179,7 +179,7 @@ static const GUID DInput_Wine_Joystick_Constant_Part_GUID = {
#define test_bit(arr,bit) (((BYTE*)(arr))[(bit)>>3]&(1<<((bit)&7)))
-#define MAX_JOYDEV 64 +#define MAX_JOYDEV 1024
static int have_joydevs = -1; static struct JoyDev *joydevs = NULL; -- 2.21.0
participants (3)
-
Marvin -
Noor Schat -
Roderick Colenbrander