On Sat, Jul 23, 2016 at 8:01 AM, Corentin Rossignon <corossig(a)gmail.com> wrote:
Signed-off-by: Corentin Rossignon <corossig(a)gmail.com> --- dlls/dinput/joystick_linux.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-)
Thanks for the patch, I just tested and they work with my gamepads. Since you will have to fix the problems below I suggest that you resend the 2 patches with subjects: [PATCH 1/2] dinput: Retrieve vendor ID and product ID in Linux joystick API [PATCH 2/2] dinput: Fix product GUID generation in Linux joystick and event API Formatting problem: bruno(a)Note:~/programs/wine$ git apply dinput1 dinput1:19: trailing whitespace. dinput1:68: trailing whitespace. } warning: 2 lines add whitespace errors.
+ /* Find vendor_id and product_id in sysfs */ + joydev.vendor_id = 0; + joydev.product_id = 0; + + snprintf(sys_path, MAX_PATH, "/sys/class/input/js%d/device/id/vendor", i); + sys_fd = open(sys_path, O_RDONLY); + if (sys_path > 0) + {
Wrong variable in the condition. Best Regards, Bruno