Skip to content

Commit

Permalink
Issue #250 - Fix improper handling of "Upos" joystick axis
Browse files Browse the repository at this point in the history
- Not sure if this fixes the actual issue, but there is definitely an
error as identified by fatavatar in the issue discussion (Upos axis was
being matched to Up due to the string matching method)
  • Loading branch information
mickelson committed Nov 8, 2016
1 parent 929f218 commit 25e2781
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/fe_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ const char *FeInputSingle::mouseStrings[] =

const char *FeInputSingle::joyStrings[] =
{
"Up",
"Down",
"Left",
"Right",
"Zpos",
"Zneg",
"Rpos",
Expand All @@ -174,6 +170,10 @@ const char *FeInputSingle::joyStrings[] =
"PovXneg",
"PovYpos",
"PovYneg",
"Up",
"Down",
"Left",
"Right",
"Button",
NULL
};
Expand Down
4 changes: 2 additions & 2 deletions src/fe_input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ class FeInputSingle

enum JoyCode
{
JoyUp, JoyDown, JoyLeft, JoyRight, JoyZPos, JoyZNeg,
JoyRPos, JoyRNeg, JoyUPos, JoyUNeg, JoyVPos, JoyVNeg,
JoyZPos, JoyZNeg, JoyRPos, JoyRNeg, JoyUPos, JoyUNeg, JoyVPos, JoyVNeg,
JoyPOVXPos, JoyPOVXNeg, JoyPOVYPos, JoyPOVYNeg,
JoyUp, JoyDown, JoyLeft, JoyRight,
JoyButton0 // up to sf::Joystick::ButtonCount buttons supported starting from JoyButton0
};

Expand Down

0 comments on commit 25e2781

Please sign in to comment.