gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / freedink-engine-fix-sdl-hints.patch
1 From 85f8dda6de28ef86e58f26c8aa863a26524f6ce0 Mon Sep 17 00:00:00 2001
2 From: Jesse Gibbons <jgibbons2357+freedink@gmail.com>
3 Date: Sun, 9 Feb 2020 21:46:26 -0700
4 Subject: [PATCH] Fix mouse/touch event hints for SDL 2.0.10.
5
6 This fixes the bug reported at
7 <https://lists.gnu.org/archive/html/bug-freedink/2019-08/msg00000.html>.
8
9 It 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
14 diff --git a/src/input.cpp b/src/input.cpp
15 index 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 --
32 2.25.0
33