summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorDeadSix27 <DeadSix27@users.noreply.github.com>2023-09-20 21:01:53 +0200
committerDudemanguy <random342@airmail.cc>2023-09-21 13:51:24 +0000
commitb41bd5a8f0363259ac9ef10081555874f783139a (patch)
tree965ffb92f45e581286fd963007fb499026ac2a18 /input
parentf4de509f01f2322487e42dffd73cb8bd1118655c (diff)
downloadmpv-b41bd5a8f0363259ac9ef10081555874f783139a.tar.bz2
mpv-b41bd5a8f0363259ac9ef10081555874f783139a.tar.xz
sdl_gamepad: fix button detection on modern controllers
Needed to get the Xbox Series X Controller working fully.
Diffstat (limited to 'input')
-rw-r--r--input/sdl_gamepad.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/input/sdl_gamepad.c b/input/sdl_gamepad.c
index 7045239fda..5a5ca47d53 100644
--- a/input/sdl_gamepad.c
+++ b/input/sdl_gamepad.c
@@ -198,6 +198,8 @@ static void remove_gamepad(struct mp_input_src *src, int id)
static void read_gamepad_thread(struct mp_input_src *src, void *param)
{
+ SDL_SetHint(SDL_HINT_JOYSTICK_THREAD, "1");
+
if (SDL_WasInit(SDL_INIT_EVENTS)) {
MP_ERR(src, "Another component is using SDL already.\n");
mp_input_src_init_done(src);