diff options
author | Jesse Gibbons <jgibbons2357+guix@gmail.com> | 2020-02-10 10:18:57 -0700 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2020-08-12 17:08:47 +0200 |
commit | 8677e8699a0a882efb579de385d020f3aebf0127 (patch) | |
tree | e9aa23a0100a80477e9881b12026f160d513ed4b /gnu/packages | |
parent | e7e69e56f59546efce6ffd8e7d3cbee70970930c (diff) | |
download | guix-8677e8699a0a882efb579de385d020f3aebf0127.tar.gz |
gnu: freedink-engine: Fix SDL hints.
* gnu/packages/games.scm: freedink: [patches]: Add fix. * gnu/packages/patches/freedink-engine-fix-sdl-hints.patch: New file. * gnu/local.mk: Add it. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/games.scm | 1 | ||||
-rw-r--r-- | gnu/packages/patches/freedink-engine-fix-sdl-hints.patch | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index e8cb012fba..8e4aa0742b 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -2732,6 +2732,7 @@ interface or via an external visual interface such as GNU XBoard.") (method url-fetch) (uri (string-append "mirror://gnu/freedink/freedink-" version ".tar.gz")) + (patches (search-patches "freedink-engine-fix-sdl-hints.patch")) (sha256 (base32 "00hhk1bjdrc1np2qz44sa5n1mb62qzwxbvsnws3vpms6iyn3a2sy")))) diff --git a/gnu/packages/patches/freedink-engine-fix-sdl-hints.patch b/gnu/packages/patches/freedink-engine-fix-sdl-hints.patch new file mode 100644 index 0000000000..ce37ab4870 --- /dev/null +++ b/gnu/packages/patches/freedink-engine-fix-sdl-hints.patch @@ -0,0 +1,33 @@ +From 85f8dda6de28ef86e58f26c8aa863a26524f6ce0 Mon Sep 17 00:00:00 2001 +From: Jesse Gibbons <jgibbons2357+freedink@gmail.com> +Date: Sun, 9 Feb 2020 21:46:26 -0700 +Subject: [PATCH] Fix mouse/touch event hints for SDL 2.0.10. + +This fixes the bug reported at +<https://lists.gnu.org/archive/html/bug-freedink/2019-08/msg00000.html>. + +It should remain backwards compatible with releases of SDL prior to 2.0.10. +--- + src/input.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/input.cpp b/src/input.cpp +index b5ae21e..153d349 100644 +--- a/src/input.cpp ++++ b/src/input.cpp +@@ -91,7 +91,12 @@ void input_init(void) + + // TODO: don't attempt to simulate mouse events from touch events - + // fake mouse events often are de-centered ++#ifdef SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH + SDL_SetHint(SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH, "0"); ++#elif defined SDL_HINT_MOUSE_TOUCH_EVENTS && defined SDL_HINT_TOUCH_MOUSE_EVENTS ++ SDL_SetHint(SDL_HINT_MOUSE_TOUCH_EVENTS, "0"); ++ SDL_SetHint(SDL_HINT_TOUCH_MOUSE_EVENTS, "0"); ++#endif + + /* Touch devices */ + { +-- +2.25.0 + |