mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 06:58:30 +00:00
Renamed SDL_AttachVirtualJoystickEx() to SDL_AttachVirtualJoystick()
The shorthand version of this function didn't allow specifying a controller name, which seems pretty important. It seems like anyone actually implementing a virtual joystick is going to want to use some of the extended functionality.
This commit is contained in:
@@ -1167,19 +1167,7 @@ SDL_Joystick *SDL_OpenJoystick(SDL_JoystickID instance_id)
|
||||
return joystick;
|
||||
}
|
||||
|
||||
SDL_JoystickID SDL_AttachVirtualJoystick(SDL_JoystickType type, int naxes, int nbuttons, int nhats)
|
||||
{
|
||||
SDL_VirtualJoystickDesc desc;
|
||||
|
||||
SDL_zero(desc);
|
||||
desc.type = (Uint16)type;
|
||||
desc.naxes = (Uint16)naxes;
|
||||
desc.nbuttons = (Uint16)nbuttons;
|
||||
desc.nhats = (Uint16)nhats;
|
||||
return SDL_AttachVirtualJoystickEx(&desc);
|
||||
}
|
||||
|
||||
SDL_JoystickID SDL_AttachVirtualJoystickEx(const SDL_VirtualJoystickDesc *desc)
|
||||
SDL_JoystickID SDL_AttachVirtualJoystick(const SDL_VirtualJoystickDesc *desc)
|
||||
{
|
||||
#ifdef SDL_JOYSTICK_VIRTUAL
|
||||
SDL_JoystickID retval;
|
||||
|
Reference in New Issue
Block a user