Removed balls from the joystick API
They were only used by one joystick decades ago, so removing them for SDL3 Fixes https://github.com/libsdl-org/SDL/issues/6766
This commit is contained in:
@@ -370,9 +370,8 @@ WatchJoystick(SDL_Joystick *joystick)
|
||||
name = SDL_JoystickName(joystick);
|
||||
SDL_Log("Watching joystick %" SDL_PRIs32 ": (%s)\n", SDL_JoystickInstanceID(joystick),
|
||||
name ? name : "Unknown Joystick");
|
||||
SDL_Log("Joystick has %d axes, %d hats, %d balls, and %d buttons\n",
|
||||
SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick),
|
||||
SDL_JoystickNumBalls(joystick), SDL_JoystickNumButtons(joystick));
|
||||
SDL_Log("Joystick has %d axes, %d hats, and %d buttons\n",
|
||||
SDL_JoystickNumAxes(joystick), SDL_JoystickNumHats(joystick), SDL_JoystickNumButtons(joystick));
|
||||
|
||||
SDL_Log("\n\n\
|
||||
====================================================================================\n\
|
||||
@@ -498,8 +497,6 @@ WatchJoystick(SDL_Joystick *joystick)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SDL_JOYBALLMOTION:
|
||||
break;
|
||||
case SDL_JOYBUTTONDOWN:
|
||||
if (event.jbutton.which == nJoystickID) {
|
||||
SDL_GameControllerExtendedBind binding;
|
||||
@@ -773,7 +770,6 @@ int main(int argc, char *argv[])
|
||||
SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(joystick),
|
||||
guid, sizeof(guid));
|
||||
SDL_Log(" axes: %d\n", SDL_JoystickNumAxes(joystick));
|
||||
SDL_Log(" balls: %d\n", SDL_JoystickNumBalls(joystick));
|
||||
SDL_Log(" hats: %d\n", SDL_JoystickNumHats(joystick));
|
||||
SDL_Log(" buttons: %d\n", SDL_JoystickNumButtons(joystick));
|
||||
SDL_Log("instance id: %" SDL_PRIu32 "\n", SDL_JoystickInstanceID(joystick));
|
||||
|
||||
@@ -47,7 +47,6 @@ TestVirtualJoystick(void *arg)
|
||||
SDLTest_AssertCheck(SDL_JoystickGetSerial(joystick) == NULL, "SDL_JoystickGetSerial()");
|
||||
SDLTest_AssertCheck(SDL_JoystickGetType(joystick) == desc.type, "SDL_JoystickGetType()");
|
||||
SDLTest_AssertCheck(SDL_JoystickNumAxes(joystick) == desc.naxes, "SDL_JoystickNumAxes()");
|
||||
SDLTest_AssertCheck(SDL_JoystickNumBalls(joystick) == 0, "SDL_JoystickNumBalls()");
|
||||
SDLTest_AssertCheck(SDL_JoystickNumHats(joystick) == desc.nhats, "SDL_JoystickNumHats()");
|
||||
SDLTest_AssertCheck(SDL_JoystickNumButtons(joystick) == desc.nbuttons, "SDL_JoystickNumButtons()");
|
||||
|
||||
|
||||
@@ -80,7 +80,6 @@ PrintJoystick(SDL_Joystick *joy)
|
||||
SDL_Log(" rumble: %s\n", SDL_JoystickHasRumble(joy) ? "yes" : "no");
|
||||
SDL_Log("trigger rumble: %s\n", SDL_JoystickHasRumbleTriggers(joy) ? "yes" : "no");
|
||||
SDL_Log(" axes: %d\n", SDL_JoystickNumAxes(joy));
|
||||
SDL_Log(" balls: %d\n", SDL_JoystickNumBalls(joy));
|
||||
SDL_Log(" hats: %d\n", SDL_JoystickNumHats(joy));
|
||||
SDL_Log(" buttons: %d\n", SDL_JoystickNumButtons(joy));
|
||||
SDL_Log(" instance id: %" SDL_PRIs32 "\n", SDL_JoystickInstanceID(joy));
|
||||
@@ -156,11 +155,6 @@ void loop(void *arg)
|
||||
}
|
||||
SDL_Log("\n");
|
||||
break;
|
||||
case SDL_JOYBALLMOTION:
|
||||
SDL_Log("Joystick %" SDL_PRIs32 " ball %d delta: (%d,%d)\n",
|
||||
event.jball.which,
|
||||
event.jball.ball, event.jball.xrel, event.jball.yrel);
|
||||
break;
|
||||
case SDL_JOYBUTTONDOWN:
|
||||
SDL_Log("Joystick %" SDL_PRIs32 " button %d down\n",
|
||||
event.jbutton.which, event.jbutton.button);
|
||||
|
||||
Reference in New Issue
Block a user