|
From: Yoda-JM <yo...@us...> - 2010-01-15 22:44:57
|
Module: performous
Branch: master
Commit: 47ae3fe068c751197d41b8d9c89184162859e0bf
Author: Vincent Le Ligeour <yo...@us...>
Date: Fri Jan 15 23:44:39 2010 +0100
Fixed TigerGame dancepad (strange fix)
---
data/schema.xml | 2 +-
game/joystick.cc | 20 ++++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index 6548b2a..58cd9c4 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -85,7 +85,7 @@ to save the current settings to XML.
</locale>
</entry>
<entry name="game/instruments" type="string_list">
- <!-- Should be SDL_ID:{GUITAR_GUITARHERO|GUITAR_GUITARHERO_XPLORER|GUITAR_ROCKBAND_PS3|GUITAR_ROCKBAND_XB360|DRUMS_GUITARHERO|DRUMS_ROCKBAND_PS3|DRUMS_ROCKBAND_XB360|DRUMS_MIDI|DANCEPAD_GENERIC}
+ <!-- Should be SDL_ID:{GUITAR_GUITARHERO|GUITAR_GUITARHERO_XPLORER|GUITAR_ROCKBAND_PS3|GUITAR_ROCKBAND_XB360|DRUMS_GUITARHERO|DRUMS_ROCKBAND_PS3|DRUMS_ROCKBAND_XB360|DRUMS_MIDI|DANCEPAD_GENERIC|DANCEPAD_TIGERGAME}
example:
<stringvalue>0:GUITAR_GUITARHERO</stringvalue>
-->
diff --git a/game/joystick.cc b/game/joystick.cc
index 0cd0bfc..61ec453 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -35,22 +35,22 @@ void input::MidiDrums::process() {
}
#endif
-static const unsigned SDL_BUTTONS = 10;
+static const unsigned SDL_BUTTONS = 12;
int input::buttonFromSDL(input::Private::Type _type, unsigned int _sdl_button) {
static const int inputmap[9][SDL_BUTTONS] = {
//G R Y B O S // for guitars (S=starpower)
- { 2, 0, 1, 3, 4, 5, -1, -1, 8, 9 }, // Guitar Hero guitar
- { 0, 1, 3, 2, 4,-1, 8, 9,-1,-1 }, // Guitar Hero X-plorer guitar
- { 3, 0, 1, 2, 4, 5, -1, -1, 8, 9 }, // Rock Band guitar PS3
- { 0, 1, 3, 2, 4, 5, -1, -1, 8, 9 }, // Rock Band guitar XBOX360
+ { 2, 0, 1, 3, 4, 5, -1, -1, 8, 9, -1, -1 }, // Guitar Hero guitar
+ { 0, 1, 3, 2, 4,-1, 8, 9,-1,-1, -1, -1 }, // Guitar Hero X-plorer guitar
+ { 3, 0, 1, 2, 4, 5, -1, -1, 8, 9, -1, -1 }, // Rock Band guitar PS3
+ { 0, 1, 3, 2, 4, 5, -1, -1, 8, 9, -1, -1 }, // Rock Band guitar XBOX360
//K R Y B G O // for drums
- { 3, 4, 1, 2, 0, 4, -1, -1, 8, 9 }, // Guitar Hero drums
- { 3, 4, 1, 2, 0,-1, -1, -1, 8, 9 }, // Rock Band drums PS3
- { 4, 1, 3, 2, 0,-1, -1, -1, 8, 9 }, // Rock Band drums XBOX360
+ { 3, 4, 1, 2, 0, 4, -1, -1, 8, 9, -1, -1 }, // Guitar Hero drums
+ { 3, 4, 1, 2, 0,-1, -1, -1, 8, 9, -1, -1 }, // Rock Band drums PS3
+ { 4, 1, 3, 2, 0,-1, -1, -1, 8, 9, -1, -1 }, // Rock Band drums XBOX360
// Left Down Up Right DownL DownR UpL UpR Start Select
- { 0, 1, 2, 3, 6, 7, 4, 5, 9, 8 }, // generic dance pad
- { 9, 8, 2, 1, 6, 7, 4, 5, 0, 3 } // TigerGame dance pas
+ { 0, 1, 2, 3, 6, 7, 4, 5, 9, 8, -1, -1 }, // generic dance pad
+ { 9, 8, -1, -1, -1, -1, -1, -1, 0, 3, 1, 2 } // TigerGame dance pad
};
if( _sdl_button >= SDL_BUTTONS ) return -1;
switch(_type) {
|