[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:
>      {
>          id = ((SDL_JoyButtonEvent *)event)->which;
>          impl = find_device_from_id(id);
> +        if (impl && options.split_controllers && event->type == SDL_JOYAXISMOTION) {
> +          axis_offset = ((SDL_JoyAxisEvent *)event)->axis / 6;
> +          if (axis_offset > 0)
> +          {
> +            ((SDL_JoyAxisEvent*)event)->axis = ((SDL_JoyAxisEvent*)event)->axis % 6;
> +            impl = find_device_from_id_and_offset(id, axis_offset);
> +          }
> +        }
I think this would be cleaner in a dedicated earlier `else if (event->type == SDL_JOYAXISMOTION && options.split_controllers)` block. Please also keep the original indentation and bracing styles.

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



More information about the wine-devel mailing list