diff options
Diffstat (limited to 'src/joyGet.cpp')
-rw-r--r-- | src/joyGet.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/joyGet.cpp b/src/joyGet.cpp index f48c783..0de5cc0 100644 --- a/src/joyGet.cpp +++ b/src/joyGet.cpp @@ -1,32 +1,32 @@ #include "FLD.hpp" FLD::InputState -FLD::joyGet(SDL_Scancode sc) const +FLD::joyGet(Uint8 btn) const { - return joystates[sc]; + return joystates[btn]; } bool -FLD::joyDown(SDL_Scancode sc) const +FLD::joyDown(Uint8 btn) const { - const auto state = joyGet(sc); + const auto state = joyGet(btn); return (state == InputState::Down || state == InputState::Press); } bool -FLD::joyUp(SDL_Scancode sc) const +FLD::joyUp(Uint8 btn) const { - return !joyDown(sc); + return !joyDown(btn); } bool -FLD::joyPressed(SDL_Scancode sc) const +FLD::joyPressed(Uint8 btn) const { - return (joyGet(sc) == InputState::Press); + return (joyGet(btn) == InputState::Press); } bool -FLD::joyReleased(SDL_Scancode sc) const +FLD::joyReleased(Uint8 btn) const { - return (joyGet(sc) == InputState::Release); + return (joyGet(btn) == InputState::Release); } |