Re-added balls to the SDL joystick API

It turns out these were being used on Linux and at least one virtual driver was making use of them (thanks @mrfixit2001!)
This commit is contained in:
Sam Lantinga
2024-03-10 21:06:14 -07:00
parent 53e86be22f
commit efbbafb3f1
16 changed files with 262 additions and 28 deletions

View File

@@ -1719,6 +1719,11 @@ static void SDLTest_PrintEvent(const SDL_Event *event)
SDL_Log("SDL EVENT: Joystick %" SDL_PRIu32 " removed",
event->jdevice.which);
break;
case SDL_EVENT_JOYSTICK_BALL_MOTION:
SDL_Log("SDL EVENT: Joystick %" SDL_PRIs32 ": ball %d moved by %d,%d",
event->jball.which, event->jball.ball, event->jball.xrel,
event->jball.yrel);
break;
case SDL_EVENT_JOYSTICK_HAT_MOTION:
{
const char *position = "UNKNOWN";