[mupen64plus-core] 217/310: Ignore key repeats caused by the OS keyrepeat setting
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:58:02 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-core.
commit 803884ae3c5bd72e2bc6603fefebb66c77b55e22
Author: Sven Eckelmann <sven at narfation.org>
Date: Tue Jun 11 17:22:41 2013 +0200
Ignore key repeats caused by the OS keyrepeat setting
---
debian/changelog | 1 +
debian/patches/sdl2_keyrepeat.patch | 29 +++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 31 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 860045c..bf1c158 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ mupen64plus-core (2.0~rc3+3+5d46baa3dd76-2) UNRELEASED; urgency=low
- Add sdl2_resize.patch, Fix compiling against SDL2
- Add country_code_bits.patch, Ignore upper 8 bit of countrycode when
checking for PAL/NTSC system
+ - Add sdl2_keyrepeat.patch, Ignore key repeats caused by the OS keyrepeat
-- Sven Eckelmann <sven at narfation.org> Sun, 09 Jun 2013 22:51:15 +0200
diff --git a/debian/patches/sdl2_keyrepeat.patch b/debian/patches/sdl2_keyrepeat.patch
new file mode 100644
index 0000000..595dacf
--- /dev/null
+++ b/debian/patches/sdl2_keyrepeat.patch
@@ -0,0 +1,29 @@
+Description: Ignore key repeats caused by the OS keyrepeat setting
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/src/main/eventloop.c b/src/main/eventloop.c
+index e16141d6b775ed7410069d78aebaab2668c5f84e..fb33aa10f0ca208c4100ca215cf89f78ca1f2a6a 100644
+--- a/src/main/eventloop.c
++++ b/src/main/eventloop.c
+@@ -246,6 +246,9 @@ static int SDLCALL event_sdl_filter(void *userdata, SDL_Event *event)
+
+ case SDL_KEYDOWN:
+ #if SDL_VERSION_ATLEAST(1,3,0)
++ if (event->key.repeat)
++ return 0;
++
+ event_sdl_keydown(event->key.keysym.scancode, event->key.keysym.mod);
+ #else
+ event_sdl_keydown(event->key.keysym.sym, event->key.keysym.mod);
+@@ -362,9 +365,7 @@ void event_initialize(void)
+ }
+
+ /* set up SDL event filter and disable key repeat */
+-#if SDL_VERSION_ATLEAST(2,0,0)
+-#warning SDL_EnableKeyRepeat unsupported
+-#else
++#if !SDL_VERSION_ATLEAST(2,0,0)
+ SDL_EnableKeyRepeat(0, 0);
+ #endif
+ SDL_SetEventFilter(event_sdl_filter, NULL);
diff --git a/debian/patches/series b/debian/patches/series
index 1ede4f3..0b628a1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ printf_fixup.patch
disable_recompiler_disassembler.patch
sdl2_resize.patch
country_code_bits.patch
+sdl2_keyrepeat.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-core.git
More information about the Pkg-games-commits
mailing list