r14126 - in packages/trunk/supertux/debian: . patches

Vincent Cheng vincentc-guest at alioth.debian.org
Thu May 23 09:59:01 UTC 2013


Author: vincentc-guest
Date: 2013-05-23 09:59:01 +0000 (Thu, 23 May 2013)
New Revision: 14126

Added:
   packages/trunk/supertux/debian/patches/fix_joystick_conf_loss.patch
Modified:
   packages/trunk/supertux/debian/changelog
   packages/trunk/supertux/debian/patches/series
Log:
supertuxk: Add patch to fix #706564 (lost joystick config)


Modified: packages/trunk/supertux/debian/changelog
===================================================================
--- packages/trunk/supertux/debian/changelog	2013-05-22 01:58:29 UTC (rev 14125)
+++ packages/trunk/supertux/debian/changelog	2013-05-23 09:59:01 UTC (rev 14126)
@@ -1,3 +1,11 @@
+supertux (0.3.3-6) experimental; urgency=low
+
+  * Add debian/patches/fix_joystick_conf_loss.patch: stop overwriting user's
+    joystick configuration with default values when joystick is not plugged in.
+    (Closes: #706564)
+
+ -- Vincent Cheng <Vincentc1208 at gmail.com>  Thu, 23 May 2013 02:52:12 -0700
+
 supertux (0.3.3-5) experimental; urgency=low
 
   * Add debian/patches/fix_gcc4.7_ftbfs.patch to fix FTBFS with gcc 4.7.

Added: packages/trunk/supertux/debian/patches/fix_joystick_conf_loss.patch
===================================================================
--- packages/trunk/supertux/debian/patches/fix_joystick_conf_loss.patch	                        (rev 0)
+++ packages/trunk/supertux/debian/patches/fix_joystick_conf_loss.patch	2013-05-23 09:59:01 UTC (rev 14126)
@@ -0,0 +1,43 @@
+Description: Do not reset joystick conf when the joystick is not plugged in
+ If the game is started when the joystick/joypad is not plugged in,
+ the joystick input configuration should not be reset to its default
+ state.
+Author: Arian Behvandnejad <buggy at lavabit.com>
+Origin: https://supertux.lethargik.org/bugs/file_download.php?file_id=657&type=bug
+Bug: https://supertux.lethargik.org/bugs/view.php?id=959
+Bug-Debian: http://bugs.debian.org/706564
+Last-Update: 2013-05-13
+
+--- supertux-0.3.3.orig/src/control/joystickkeyboardcontroller.cpp
++++ supertux-0.3.3/src/control/joystickkeyboardcontroller.cpp
+@@ -229,8 +229,10 @@ JoystickKeyboardController::read(const R
+           continue;
+         }
+ 
++	bool js_available = joysticks.size() > 0;
++
+         if (map->get("button", button)) {
+-          if(button < 0 || button >= max_joybuttons) {
++          if(js_available && (button < 0 || button >= max_joybuttons)) {
+             log_info << "Invalid button '" << button << "' in buttonmap" << std::endl;
+             continue;
+           }
+@@ -238,7 +240,7 @@ JoystickKeyboardController::read(const R
+         }
+ 
+         if (map->get("axis",   axis)) {
+-          if (axis == 0 || abs(axis) > max_joyaxis) {
++          if (js_available && (axis == 0 || abs(axis) > max_joyaxis)) {
+             log_info << "Invalid axis '" << axis << "' in axismap" << std::endl;
+             continue;
+           }
+@@ -246,7 +248,8 @@ JoystickKeyboardController::read(const R
+         }
+ 
+         if (map->get("hat",   hat)) {
+-          if (hat != SDL_HAT_UP   &&
++          if (js_available        &&
++              hat != SDL_HAT_UP   &&
+               hat != SDL_HAT_DOWN &&
+               hat != SDL_HAT_LEFT &&
+               hat != SDL_HAT_RIGHT) {

Modified: packages/trunk/supertux/debian/patches/series
===================================================================
--- packages/trunk/supertux/debian/patches/series	2013-05-22 01:58:29 UTC (rev 14125)
+++ packages/trunk/supertux/debian/patches/series	2013-05-23 09:59:01 UTC (rev 14126)
@@ -5,3 +5,4 @@
 fix_desktop_file.patch
 fix_spelling_errors.patch
 fix_man_page.patch
+fix_joystick_conf_loss.patch




More information about the Pkg-games-commits mailing list