|
From: knittl <kn...@us...> - 2009-08-03 08:40:42
|
Module: performous
Branch: master
Commit: 2f88cdb319a4fd1d933cc709b629c53d03897dd4
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat Aug 1 18:12:49 2009 +0200
Made it work except if you press a button before starting performous
---
game/joystick.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 691042b..8971b60 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -68,7 +68,7 @@ void input::init_devices() {
for( unsigned int i = 0 ; i < num_buttons ; ++i ) {
SDL_Event event;
int state = SDL_JoystickGetButton(input::sdl_devices[id], i);
- if( state == 0 ) {
+ if( state != 0 ) {
event.type = SDL_JOYBUTTONDOWN;
event.jbutton.type = SDL_JOYBUTTONDOWN;
event.jbutton.state = SDL_PRESSED;
|