mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
sdl_gamepad: add version check for SDL_HINT_JOYSTICK_THREAD
Requires SDL version 2.0.14.
This commit is contained in:
parent
36a33b44b9
commit
19b27341a9
@ -200,7 +200,9 @@ 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)
|
||||||
{
|
{
|
||||||
|
#if SDL_VERSION_ATLEAST(2, 0, 14)
|
||||||
SDL_SetHint(SDL_HINT_JOYSTICK_THREAD, "1");
|
SDL_SetHint(SDL_HINT_JOYSTICK_THREAD, "1");
|
||||||
|
#endif
|
||||||
|
|
||||||
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");
|
||||||
|
Loading…
Reference in New Issue
Block a user