projects/guix·blob python-team · refs

33 lines · 1.1 KiB

1From 85f8dda6de28ef86e58f26c8aa863a26524f6ce0 Mon Sep 17 00:00:00 2001
2From: Jesse Gibbons <[email protected]>
3Date: Sun, 9 Feb 2020 21:46:26 -0700
4Subject: [PATCH] Fix mouse/touch event hints for SDL 2.0.10.
5
6This fixes the bug reported at
7<https://lists.gnu.org/archive/html/bug-freedink/2019-08/msg00000.html>.
8
9It should remain backwards compatible with releases of SDL prior to 2.0.10.
10---
11 src/input.cpp | 5 +++++
12 1 file changed, 5 insertions(+)
13
14diff --git a/src/input.cpp b/src/input.cpp
15index b5ae21e..153d349 100644
16--- a/src/input.cpp
17+++ b/src/input.cpp
18@@ -91,7 +91,12 @@ void input_init(void)
19
20 // TODO: don't attempt to simulate mouse events from touch events -
21 // fake mouse events often are de-centered
22+#ifdef SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH
23 SDL_SetHint(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH, "0");
24+#elif defined SDL_HINT_MOUSE_TOUCH_EVENTS && defined SDL_HINT_TOUCH_MOUSE_EVENTS
25+ SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0");
26+ SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0");
27+#endif
28
29 /* Touch devices */
30 {
31--
322.25.0
33