Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds
This commit is contained in:
parent
2a4a81ad63
commit
34b88dfaae
30 changed files with 4191 additions and 580 deletions
|
@ -238,7 +238,7 @@ SDL_JoystickIsHaptic(SDL_Joystick * joystick)
|
|||
int ret;
|
||||
|
||||
/* Must be a valid joystick */
|
||||
if (!SDL_PrivateJoystickValid(&joystick)) {
|
||||
if (!SDL_PrivateJoystickValid(joystick)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -263,7 +263,7 @@ SDL_HapticOpenFromJoystick(SDL_Joystick * joystick)
|
|||
SDL_Haptic *haptic;
|
||||
|
||||
/* Must be a valid joystick */
|
||||
if (!SDL_PrivateJoystickValid(&joystick)) {
|
||||
if (!SDL_PrivateJoystickValid(joystick)) {
|
||||
SDL_SetError("Haptic: Joystick isn't valid.");
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -520,7 +520,7 @@ SDL_SYS_HapticMouse(void)
|
|||
|
||||
/* Grab the first mouse haptic device we find. */
|
||||
for (i = 0; i < SDL_numhaptics; i++) {
|
||||
if (SDL_hapticlist[i].capabilities.dwDevType == DIDEVTYPE_MOUSE) {
|
||||
if (SDL_hapticlist[i].capabilities.dwDevType == DI8DEVCLASS_POINTER ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue