mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-28 05:58:29 +00:00
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:
@@ -297,7 +297,7 @@ int Android_OnHat(int device_id, int hat_id, int x, int y)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Android_AddJoystick(int device_id, const char *name, const char *desc, int vendor_id, int product_id, SDL_bool is_accelerometer, int button_mask, int naxes, int nhats, int nballs)
|
||||
int Android_AddJoystick(int device_id, const char *name, const char *desc, int vendor_id, int product_id, SDL_bool is_accelerometer, int button_mask, int naxes, int nhats)
|
||||
{
|
||||
SDL_joylist_item *item;
|
||||
SDL_JoystickGUID guid;
|
||||
@@ -389,7 +389,6 @@ int Android_AddJoystick(int device_id, const char *name, const char *desc, int v
|
||||
}
|
||||
item->naxes = naxes;
|
||||
item->nhats = nhats;
|
||||
item->nballs = nballs;
|
||||
item->device_instance = SDL_GetNextJoystickInstanceID();
|
||||
if (SDL_joylist_tail == NULL) {
|
||||
SDL_joylist = SDL_joylist_tail = item;
|
||||
@@ -478,7 +477,7 @@ static int ANDROID_JoystickInit(void)
|
||||
|
||||
if (SDL_GetHintBoolean(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_TRUE)) {
|
||||
/* Default behavior, accelerometer as joystick */
|
||||
Android_AddJoystick(ANDROID_ACCELEROMETER_DEVICE_ID, ANDROID_ACCELEROMETER_NAME, ANDROID_ACCELEROMETER_NAME, 0, 0, SDL_TRUE, 0, 3, 0, 0);
|
||||
Android_AddJoystick(ANDROID_ACCELEROMETER_DEVICE_ID, ANDROID_ACCELEROMETER_NAME, ANDROID_ACCELEROMETER_NAME, 0, 0, SDL_TRUE, 0, 3, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -588,7 +587,6 @@ static int ANDROID_JoystickOpen(SDL_Joystick *joystick, int device_index)
|
||||
joystick->hwdata = (struct joystick_hwdata *)item;
|
||||
item->joystick = joystick;
|
||||
joystick->nhats = item->nhats;
|
||||
joystick->nballs = item->nballs;
|
||||
joystick->nbuttons = item->nbuttons;
|
||||
joystick->naxes = item->naxes;
|
||||
|
||||
|
Reference in New Issue
Block a user