-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SDL3] Adding input and FFB support for Logitech G29(PS3) on hidapi #11598
base: main
Are you sure you want to change the base?
Conversation
This is an impressive PR. How does this interact with other drivers, like new-lg4ff? Is there any reason we'd want this active when those are available? |
Thanks but a large portion of it was ported from https://github.com/berarma/new-lg4ff
On Linux, it depends on how it was opened:
Which path would happen depends on which hidapi backend SDL was built to use and device node permissions On MacOS, if I understand correctly some games also use IOHIDManager to provide wheel support on their own. SDL3 currently does not grab exclusive access Line 1246 in 4742922
No idea if existing games grab exclusive access On Windows, I have no idea how it would react with the Logitech driver, no idea if any exclusive access would happen when hidapi opens the device from CM_Get_Device_Interface_List fetched interface names
On Linux, evdev does not provide an analog to As for availability, unless udev rules were supplied (usb) (hidraw), the evdev backend would be used on SDL On Windows, once again I have no idea |
Added build fixes for platforms with hidapi disabled, without M_PI, and Android Still need help with MSVC project files |
f3c2dcc
to
c59ecbc
Compare
rebased and fixed windows building |
If code was taken from there, is there permission to relicense it from GPL to zlib? |
Current implementation does not include SDL_Haptic integration for force feedback Supported devices: G29, G27, G25, DFGT, DFP Features: Joystick button, hat and axis input 5 level rev light control on SDL_JoystickSetLED raw hid command sending on SDL_JoystickSendEffect all command sending are based on https://github.com/berarma/new-lg4ff tested on G29 in various compat modes shifter input is not tested because I don't have one
effect rendering is ported from https://github.com/berarma/new-lg4ff
If a SDL_Joystick internal lookup manages to define a joystick type that is not gamepad, it should stay as a joystick
…d, SDL_SetHapticGain and SDL_SetHapticAutocenter sequence
Original commit: Author: Ozkan Sezer <[email protected]> Date: Sun Dec 29 17:55:04 2024 +0300 minor clean-ups: - make _abs,_llabs, get_time_ms, effect_is_periodic, effect_is_condition helpers static inline. - rename _abs and _llabs to abs32 and abs64 to avoid analyzers complain about reserved names. - make the drivers[] array static. - NULL terminate the drivers[] array to avoid an empty array in case if SDL_HAPTIC_HIDAPI_LG4FF isn't configured. - minor formatting clean-ups here and there. - remove #endif comments about SDL_JOYSTICK_HIDAPI for readability. those #if / #endif blocks are short enough already.
#11591 for SDL3
companion test program for SDL3 https://github.com/Kethen/sdl_lg4ff_util/tree/SDL3_lg4ff
WINE has not moved onto SDL3 so it cannot be tried on WINE at the moment