mirror of https://github.com/mpv-player/mpv
sdl_gamepad: fix button detection on modern controllers
Needed to get the Xbox Series X Controller working fully.
This commit is contained in:
parent
f4de509f01
commit
b41bd5a8f0
|
@ -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)
|
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)) {
|
if (SDL_WasInit(SDL_INIT_EVENTS)) {
|
||||||
MP_ERR(src, "Another component is using SDL already.\n");
|
MP_ERR(src, "Another component is using SDL already.\n");
|
||||||
mp_input_src_init_done(src);
|
mp_input_src_init_done(src);
|
||||||
|
|
Loading…
Reference in New Issue