Xb2XInput icon indicating copy to clipboard operation
Xb2XInput copied to clipboard

stuttery/stuck input

Open Lana-chan opened this issue 1 year ago • 1 comments

using Xb2Input v1.5c and ViGEmBus 1.22.0 i have a Microsoft Xbox Controller v2 (US) [045E:0289] working as intended, however, in Steam controller test and in games (with or without Steam Input enabled) i have noticeable input delays and very often button releases do not get updated until i press either a different button or touch one of the analog sticks. i cannot tell if this is an issue with Xb2Input or ViGEmBus. please let me know if there's any more information i can provide

EDIT: this still happens even using a fork with increased poll rate

Lana-chan avatar Feb 04 '24 08:02 Lana-chan

this has to do with the blocking nature of the polling in https://github.com/emoose/Xb2XInput/blob/master/Xb2XInput/XboxController.cpp#L506 with libusb_interrupt_transfer. between polls (even with a very high polling rate) packets from the controller would get lost and button releases wouldn't be reflected on the vigembus.

hacking away at making this thread use libusb_fill_interrupt_transfer instead and use a poll of 1ms seems to have largely fixed these issues. ideally no polling time would be used and instead a callback to update the vigembus is needed, but that would take a large restructuring of the entire program. for now i can play yakuza on an og xbox controller 👍

Lana-chan avatar Feb 05 '24 04:02 Lana-chan