[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:
>      struct sdl_device *impl;
>  
>      LIST_FOR_EACH_ENTRY(impl, &device_list, struct sdl_device, unix_device.entry)
> -        if (impl->id == id) return impl;
> +        if (impl->id == id && impl->axis_offset == 0) return impl;
> +
> +    return NULL;
> +}
> +
> +static struct sdl_device *find_device_from_id_and_offset(SDL_JoystickID id, unsigned int offset)
> +{
> +    struct sdl_device *impl;
> +
> +    LIST_FOR_EACH_ENTRY(impl, &device_list, struct sdl_device, unix_device.entry)
> +        if (impl->id == id && impl->axis_offset == offset) return impl;
With the `axis_offset` change described below I think this should take an axis number as parameter, and look for a device which matches `impl->axis_offset <= axis && impl->axis_offset + impl->unix_device.hid_device_state.abs_axis_count > axis`.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/181#note_1648



More information about the wine-devel mailing list