ref: 81b81c96bf481bfa0cb829db38144eef14e0d048
parent: 782e0301c39d25e72a83377f9abd215cfe91f43d
author: Wintermute 0110 <wintermute0110@gmail.com>
date: Tue Mar 21 00:05:31 EDT 2017
Fix detection of triggers in XBox 360 wireless gamepad. (#889) Bad axis detection was apparently broken at some point; this fixes it.
--- a/.gitignore
+++ b/.gitignore
@@ -41,3 +41,9 @@
.#*
.*.swp
.DS_store
+
+# Ignore GNU Global tags and html files
+GPATH
+GRTAGS
+GTAGS
+/HTML/
--- a/src/setup/txt_joyaxis.c
+++ b/src/setup/txt_joyaxis.c
@@ -150,12 +150,12 @@
for (i = 0; i < SDL_JoystickNumAxes(joystick_axis->joystick); ++i)
{
- //if (bad_axis[i])
- //{
- // continue;
- //}
-
axis_value = SDL_JoystickGetAxis(joystick_axis->joystick, i);
+
+ if (joystick_axis->bad_axis[i])
+ {
+ continue;
+ }
if (abs(axis_value) > best_value)
{