[PATCH 0/1] MR181: winebus: Optionally split joysticks with more than 6 axes.
Rémi Bernon (@rbernon)
wine at gitlab.winehq.org
Tue Jun 7 11:09:30 CDT 2022
Rémi Bernon (@rbernon) commented about dlls/winebus.sys/bus_sdl.c:
> USAGE_AND_PAGE physical_usage;
>
> axis_count = pSDL_JoystickNumAxes(impl->sdl_joystick);
> + if (options.split_controllers && axis_count > 6)
> + {
> + if (impl->axis_offset == axis_count / 6)
> + {
> + axis_count = axis_count % 6;
> + }
> + else
> + {
> + axis_count = 6;
> + }
> + }
Overall I'd say that the `axis_offset` field is a bit misleading, as it's not an offset but an index of 6-axis groups. I think it'd be better to have it truly an offset, so that devices may be split differently than in groups of 6 axes in the future without requiring too many changes.
For now it's okay to keep a hardcoded 6 axes limit here and in the device creation loop below.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/181#note_1647
More information about the wine-devel
mailing list