|
From: knittl <kn...@us...> - 2009-08-03 08:40:18
|
Module: performous
Branch: master
Commit: bc182d9b09e50414410e820b7266e9af27adfe76
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat Aug 1 15:42:22 2009 +0200
Added GH3/GH4 instrument matching
---
game/joystick.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index a481551..fe7036b 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -125,8 +125,11 @@ void input::init() {
for (unsigned int i = 0 ; i < nbjoysticks ; ++i) {
input::sdl_devices[i] = SDL_JoystickOpen(i);
std::string name = SDL_JoystickName(i);
- if( name.find("Guitar Hero") != std::string::npos ) {
+ if( name.find("Guitar Hero3") != std::string::npos ) {
input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::GUITAR_GH);
+ } else if( name.find("Guitar Hero4") != std::string::npos ) {
+ // here we can have both drumkit or guitar .... let say the drumkit
+ input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DRUM_GH);
} else if( name.find("Harmonix") != std::string::npos ) {
input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::GUITAR_RB);
} else {
|