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.