|
From: Yoda-JM <yo...@us...> - 2010-01-17 15:28:17
|
Module: performous
Branch: master
Commit: 5ecd0c9eaebe820dee90ff31e5bb4c2381eecc0e
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jan 17 16:27:58 2010 +0100
Fixed new event not working on PS3 devices
---
game/joystick.cc | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 6351766..be7ad92 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -124,8 +124,7 @@ input::NavButton input::getNav(SDL_Event const &e) {
else if (b == 3) return input::DOWN;
else if (b == 4) return input::RIGHT;
}
- // Are these needed?
- /* } else if (e.type == SDL_JOYAXISMOTION) {
+ } else if (e.type == SDL_JOYAXISMOTION) {
// Axis motion
int axis = e.jaxis.axis;
int value = e.jaxis.value;
@@ -133,7 +132,6 @@ input::NavButton input::getNav(SDL_Event const &e) {
else if (axis == 4 && value < 0) return input::LEFT;
else if (axis == 5 && value > 0) return input::DOWN;
else if (axis == 5 && value < 0) return input::UP;
- */
} else if (e.type == SDL_JOYHATMOTION) {
// Hat motion
int dir = e.jhat.value;
|