|
From: Yoda-JM <yo...@us...> - 2009-11-11 15:49:15
|
Module: performous
Branch: master
Commit: 3496c8effa9a95c6e65b6e17c4c4892d0cb36194
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Nov 11 16:48:48 2009 +0100
Fixed Rockband Beattles drumkit detection
---
data/schema.xml | 2 +-
game/joystick.cc | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index 93a9dde..66a2606 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -81,7 +81,7 @@ to save the current settings to XML.
<entry name="game/instruments" type="string_list">
<!-- Should be SDL_ID:{GUITAR_GUITARHERO|GUITAR_ROCKBAND|DRUMS_GUITARHERO|DRUMS_ROCKBAND}
example:
- <stringvalue>0:GUITAR_GH</stringvalue>
+ <stringvalue>0:GUITAR_GUITARHERO</stringvalue>
-->
<locale name="C">
<short>Joystick configuration</short>
diff --git a/game/joystick.cc b/game/joystick.cc
index b54d2a6..3b0e42e 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -118,7 +118,8 @@ void input::SDL::init() {
continue;
}
input::SDL::sdl_devices[i] = joy;
- std::cout << " Axes: " << SDL_JoystickNumAxes(joy);
+ std::cout << " Id: " << i;
+ std::cout << ", Axes: " << SDL_JoystickNumAxes(joy);
std::cout << ", Balls: " << SDL_JoystickNumBalls(joy);
std::cout << ", Buttons: " << SDL_JoystickNumButtons(joy);
std::cout << ", Hats: " << SDL_JoystickNumHats(joy) << std::endl;
@@ -154,6 +155,9 @@ void input::SDL::init() {
} else if( name.find("Harmonix Drum Kit") != std::string::npos ) {
std::cout << " Detected as: RockBand Drums" << std::endl;
input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DRUMS_RB);
+ } else if( name.find("Harmonix Drum kit") != std::string::npos ) {
+ std::cout << " Detected as: RockBand Drums" << std::endl;
+ input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DRUMS_RB);
} else {
std::cout << " Detected as: Unknwown (please report the name, assuming Guitar Hero Drums)" << std::endl;
input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DRUMS_GH);
|