Skip to content

Commit 712c330

Browse files
cscd98LibretroAdmin
authored andcommitted
sdl2: enable hidapi sensor input for wiimote
1 parent 086c5e1 commit 712c330

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

input/drivers_joypad/sdl_joypad.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
#define SDL_SUPPORTS_RUMBLE SDL_VERSION_ATLEAST(2, 0, 9)
3131
#define SDL_SUPPORTS_SENSORS SDL_VERSION_ATLEAST(2, 0, 14)
32+
#define SDL_SUPPORTS_HIDAPI_WII SDL_VERSION_ATLEAST(2, 26, 0)
3233

3334
typedef struct _sdl_joypad
3435
{
@@ -301,6 +302,10 @@ static void *sdl_joypad_init(void *data)
301302
/* enable extended hid reports to support ps4/ps5 rumble over bluetooth */
302303
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1");
303304
#endif
305+
#if SDL_SUPPORTS_HIDAPI_WII
306+
/* enable HIDAPI Wii driver for accelerometer/gyro support */
307+
SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_WII, "1");
308+
#endif
304309
#endif
305310

306311
memset(sdl_pads, 0, sizeof(sdl_pads));

0 commit comments

Comments
 (0)