joystick: SDL_VirtualJoystickDesc no longer takes a struct version.

If we need to extend this in the future, we'll make a second struct and
a second SDL_AttachVirtualJoystickEx-style function that uses it.

Just zero the struct and don't set a version.

Fixes #9489.
This commit is contained in:
Ryan C. Gordon committed 2024-04-13 14:16:12 -04:00
1 parent 202bd7b0ff
commit d252a8fe12
6 files changed
+4 -20

No files matched your search

-1
View File
@@ -28,7 +28,6 @@ static int TestVirtualJoystick(void *arg)
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
SDL_zero(desc);
desc.version = SDL_VIRTUAL_JOYSTICK_DESC_VERSION;
desc.type = SDL_JOYSTICK_TYPE_GAMEPAD;
desc.naxes = SDL_GAMEPAD_AXIS_MAX;
desc.nbuttons = SDL_GAMEPAD_BUTTON_MAX;
-1
View File
@@ -1117,7 +1117,6 @@ static void OpenVirtualGamepad(void)
}
SDL_zero(desc);
desc.version = SDL_VIRTUAL_JOYSTICK_DESC_VERSION;
desc.type = SDL_JOYSTICK_TYPE_GAMEPAD;
desc.naxes = SDL_GAMEPAD_AXIS_MAX;
desc.nbuttons = SDL_GAMEPAD_BUTTON_MAX;