Fix detection of triggers in XBox 360 wireless gamepad. (#889)
Bad axis detection was apparently broken at some point; this fixes it.
This commit is contained in:
parent
782e0301c3
commit
81b81c96bf
2 changed files with 11 additions and 5 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -41,3 +41,9 @@ STRIFE*.png
|
|||
.#*
|
||||
.*.swp
|
||||
.DS_store
|
||||
|
||||
# Ignore GNU Global tags and html files
|
||||
GPATH
|
||||
GRTAGS
|
||||
GTAGS
|
||||
/HTML/
|
||||
|
|
|
|||
|
|
@ -150,13 +150,13 @@ static boolean CalibrateAxis(txt_joystick_axis_t *joystick_axis)
|
|||
|
||||
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)
|
||||
{
|
||||
best_value = abs(axis_value);
|
||||
|
|
|
|||
Loading…
Reference in a new issue