summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2023-11-23 21:25:48 -0500
committersfan5 <sfan5@live.de>2023-11-24 14:27:56 +0100
commit19b27341a9ebc48b4fa15704f3e282f1b405b68c (patch)
tree77572b3c03e9e85f054ee8db2355c77a652eff3d /input
parent36a33b44b9d6f08107225028eceeeef4037c09ea (diff)
downloadmpv-19b27341a9ebc48b4fa15704f3e282f1b405b68c.tar.bz2
mpv-19b27341a9ebc48b4fa15704f3e282f1b405b68c.tar.xz
sdl_gamepad: add version check for SDL_HINT_JOYSTICK_THREAD
Requires SDL version 2.0.14.
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 790c945608..b61f7c9543 100644
--- a/input/sdl_gamepad.c
+++ b/input/sdl_gamepad.c
@@ -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)
{
+#if SDL_VERSION_ATLEAST(2, 0, 14)
SDL_SetHint(SDL_HINT_JOYSTICK_THREAD, "1");
+#endif
if (SDL_WasInit(SDL_INIT_EVENTS)) {
MP_ERR(src, "Another component is using SDL already.\n");