Mac and Linux SDL2 binary snapshots
Edward Rudd
2018-08-19 561f0d614098a95527367cc3f911e476f35643d6
source/src/joystick/bsd/SDL_sysjoystick.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -204,12 +204,14 @@
    return (SDL_SYS_numjoysticks);
}
int SDL_SYS_NumJoysticks()
int
SDL_SYS_NumJoysticks(void)
{
    return SDL_SYS_numjoysticks;
}
void SDL_SYS_JoystickDetect()
void
SDL_SYS_JoystickDetect(void)
{
}
@@ -520,12 +522,8 @@
                v *= 32768 / ((ymax - ymin + 1) / 2);
                SDL_PrivateJoystickAxis(joy, 1, v);
            }
            if (gameport.b1 != joy->buttons[0]) {
                SDL_PrivateJoystickButton(joy, 0, gameport.b1);
            }
            if (gameport.b2 != joy->buttons[1]) {
                SDL_PrivateJoystickButton(joy, 1, gameport.b2);
            }
            SDL_PrivateJoystickButton(joy, 0, gameport.b1);
            SDL_PrivateJoystickButton(joy, 1, gameport.b2);
        }
        return;
    }
@@ -561,9 +559,7 @@
                            v *= 32768 /
                                ((hitem.logical_maximum -
                                  hitem.logical_minimum + 1) / 2);
                            if (v != joy->axes[naxe]) {
                                SDL_PrivateJoystickAxis(joy, naxe, v);
                            }
                            SDL_PrivateJoystickAxis(joy, naxe, v);
                        } else if (usage == HUG_HAT_SWITCH) {
                            v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem);
                            SDL_PrivateJoystickHat(joy, 0,
@@ -574,9 +570,7 @@
                    }
                case HUP_BUTTON:
                    v = (Sint32) hid_get_data(REP_BUF_DATA(rep), &hitem);
                    if (joy->buttons[nbutton] != v) {
                        SDL_PrivateJoystickButton(joy, nbutton, v);
                    }
                    SDL_PrivateJoystickButton(joy, nbutton, v);
                    nbutton++;
                    break;
                default: