[mupen64plus-core] 218/310: Simply open joystick when needed in SDL2

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 05:58:03 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 d5fa1098ef5348c4201343186204678dab06ab95
Author: Sven Eckelmann <sven at narfation.org>
Date:   Tue Jun 11 17:42:46 2013 +0200

    Simply open joystick when needed in SDL2
    
    The joysticks in SDL2 use reference counting and return just a new reference
    when trying to reopen a joystick. SDL_JoystickOpened is not needed in SDL2.
---
 debian/changelog                          |  1 +
 debian/patches/sdl2_joystick_events.patch | 19 +++++++++++++++++++
 debian/patches/series                     |  1 +
 3 files changed, 21 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index bf1c158..b9e58e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ mupen64plus-core (2.0~rc3+3+5d46baa3dd76-2) UNRELEASED; urgency=low
     - 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
+    - Add sdl2_joystick_events.patch, Simply open joystick when needed in SDL2
 
  -- Sven Eckelmann <sven at narfation.org>  Sun, 09 Jun 2013 22:51:15 +0200
 
diff --git a/debian/patches/sdl2_joystick_events.patch b/debian/patches/sdl2_joystick_events.patch
new file mode 100644
index 0000000..286d609
--- /dev/null
+++ b/debian/patches/sdl2_joystick_events.patch
@@ -0,0 +1,19 @@
+Description: Simply open joystick when needed in SDL2
+ The joysticks in SDL2 use reference counting and return just a new reference
+ when trying to reopen a joystick. SDL_JoystickOpened is not needed in SDL2.
+Author: Sven Eckelmann <sven at narfation.org>
+
+---
+diff --git a/src/main/eventloop.c b/src/main/eventloop.c
+index fb33aa10f0ca208c4100ca215cf89f78ca1f2a6a..85a06d77d09f2cbca9b1e15cf18e0ede89be0e75 100644
+--- a/src/main/eventloop.c
++++ b/src/main/eventloop.c
+@@ -356,7 +356,7 @@ void event_initialize(void)
+             if (!SDL_WasInit(SDL_INIT_JOYSTICK))
+                 SDL_InitSubSystem(SDL_INIT_JOYSTICK);
+ #if SDL_VERSION_ATLEAST(2,0,0)
+-#warning SDL_JoystickOpened unsupported
++            SDL_JoystickOpen(device);
+ #else
+             if (!SDL_JoystickOpened(device))
+                 SDL_JoystickOpen(device);
diff --git a/debian/patches/series b/debian/patches/series
index 0b628a1..39e89f8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ disable_recompiler_disassembler.patch
 sdl2_resize.patch
 country_code_bits.patch
 sdl2_keyrepeat.patch
+sdl2_joystick_events.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