You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Yoda-JM <yo...@us...> - 2010-08-06 16:51:48
|
Module: performous Branch: master Commit: b992f235f5266604469278a60535d47fdae492ed Author: Vincent Le Ligeour <yo...@us...> Date: Wed Aug 4 13:16:37 2010 +0200 Exploded instrument definition for simpliest code/maintainability --- data/controllers.xml | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/data/controllers.xml b/data/controllers.xml index 7129607..5e83c9e 100644 --- a/data/controllers.xml +++ b/data/controllers.xml @@ -16,11 +16,22 @@ <button id="9" value="start" /> </mapping> </guitar> - <guitar name="GUITAR_RB_XBOX360"> + <guitar name="GUITAR_GH_XPLORER"> <match> <description>Guitar Hero X-plorer guitar</description> <regexp match="Guitar Hero X-plorer" /> </match> + <mapping> + <button id="0" value="green" /> + <button id="1" value="red" /> + <button id="2" value="blue" /> + <button id="3" value="yellow" /> + <button id="4" value="orange" /> + <button id="6" value="select" /> + <button id="7" value="start" /> + </mapping> + </guitar> + <guitar name="GUITAR_RB_XBOX360"> <match> <description>Rock Band guitar Xbox 360</description> <regexp match="Harmonix Guitar .* Xbox" /> @@ -83,11 +94,22 @@ <button id="9" value="start" /> </mapping> </drumkit> - <drumkit name="DRUMS_RB_PS3"> + <drumkit name="DRUMS_RB_WII"> <match> <description>RockBand Wii drum kit</description> <regexp match="Harmonix Drum Controller for Nintendo Wii" /> </match> + <mapping> + <button id="0" value="blue" /> + <button id="1" value="green" /> + <button id="2" value="red" /> + <button id="3" value="yellow" /> + <button id="4" value="kick" /> + <button id="8" value="select" /> + <button id="9" value="start" /> + </mapping> + </drumkit> + <drumkit name="DRUMS_RB_PS3"> <match> <description>RockBand PS3 drum kit</description> <regexp match="Harmonix Drum [Kk]it for Playstation" /> |
|
From: Yoda-JM <yo...@us...> - 2010-08-06 16:51:46
|
Module: performous Branch: master Commit: 6c98be0018b0015fb12bdc9de08912aef9925fb5 Author: Vincent Le Ligeour <yo...@us...> Date: Wed Aug 4 13:05:05 2010 +0200 Removed all detailled instrument type --- game/joystick.cc | 111 +++++++++++++++++++---------------------------- game/joystick.hh | 35 ++++++++------- game/screen_practice.cc | 2 +- 3 files changed, 65 insertions(+), 83 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2010-08-06 16:51:43
|
Module: performous Branch: master Commit: 762fd35cd5161be68dc51c536af8c8fee6e373e1 Author: Vincent Le Ligeour <yo...@us...> Date: Wed Aug 4 11:42:30 2010 +0200 Moved instrument definition inside InputDevPrivate --- game/joystick.cc | 58 +++++++++++++++++++++-------------------------------- game/joystick.hh | 38 ++++++++++++++-------------------- 2 files changed, 39 insertions(+), 57 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2010-08-06 16:51:41
|
Module: performous Branch: master Commit: fb76cabfaadaab0639c11761003e04e11d916d6a Author: Vincent Le Ligeour <yo...@us...> Date: Tue Aug 3 20:23:05 2010 +0200 Removed unneeded default constructor in joystick.hh --- game/joystick.cc | 66 +++++++++++++++++++++++----------------------- game/joystick.hh | 7 +---- game/screen_practice.cc | 4 +- 3 files changed, 36 insertions(+), 41 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2010-08-06 16:51:39
|
Module: performous Branch: master Commit: bfff564635572c25893f21607c1aa0f9c2872fb4 Author: Vincent Le Ligeour <yo...@us...> Date: Sat Jul 31 17:17:37 2010 +0200 Changed half of the internal controller structure (buggy and hacky) --- game/joystick.cc | 199 +++++++++++++++--------------------------------------- 1 files changed, 56 insertions(+), 143 deletions(-) |
|
From: Yoda-JM <yo...@us...> - 2010-08-06 16:51:37
|
Module: performous
Branch: master
Commit: 241801fb0807d83816b1be34297531fa52d73c65
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon Jul 26 13:59:10 2010 +0200
Moved default config file searching inside fs.* files
---
game/configuration.cc | 26 ++++++++------------------
game/fs.cc | 14 ++++++++++++++
game/fs.hh | 3 +++
3 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/game/configuration.cc b/game/configuration.cc
index 194c25f..f108d4b 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -1,6 +1,5 @@
#include "configuration.hh"
-#include "config.hh"
#include "fs.hh"
#include "util.hh"
#include <boost/filesystem.hpp>
@@ -311,24 +310,15 @@ void readConfigXML(fs::path const& file, int mode) {
void readConfig() {
// Find config schema
- std::string schemafile;
- {
- typedef std::vector<std::string> ConfigList;
- ConfigList config_list;
- char const* root = getenv("PERFORMOUS_ROOT");
- if (root) config_list.push_back(std::string(root) + "/" SHARED_DATA_DIR CONFIG_SCHEMA);
- fs::path exec = plugin::execname();
- if (!exec.empty()) config_list.push_back(exec.parent_path().string() + "/../" SHARED_DATA_DIR CONFIG_SCHEMA);
- ConfigList::const_iterator it = std::find_if(config_list.begin(), config_list.end(), static_cast<bool(&)(fs::path const&)>(fs::exists));
- if (it == config_list.end()) {
- std::ostringstream oss;
- oss << "No config schema file found. The following locations were tried:\n";
- std::copy(config_list.begin(), config_list.end(), std::ostream_iterator<std::string>(oss, "\n"));
- oss << "Install the file or define environment variable PERFORMOUS_ROOT\n";
- throw std::runtime_error(oss.str());
- }
- schemafile = *it;
+ fs::path schemafile;
+ try {
+ schemafile = getDefaultConfig(fs::path(CONFIG_SCHEMA));
origin = fs::path(schemafile).parent_path().parent_path(); // Assuming that two times parent from config file = origin
+ } catch(...) {
+ std::ostringstream oss;
+ oss << "No config schema file found.\n";
+ oss << "Install the file or define environment variable PERFORMOUS_ROOT\n";
+ throw std::runtime_error(oss.str());
}
readConfigXML(schemafile, 0); // Read schema and defaults
readConfigXML(systemConfFile, 1); // Update defaults with system config
diff --git a/game/fs.cc b/game/fs.cc
index 79895c2..14dd390 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -178,6 +178,20 @@ Paths const& getPaths(bool refresh) {
return paths;
}
+fs::path getDefaultConfig(fs::path const &configFile) {
+ typedef std::vector<std::string> ConfigList;
+ ConfigList config_list;
+ char const* root = getenv("PERFORMOUS_ROOT");
+ if (root) config_list.push_back(std::string(root) + "/" SHARED_DATA_DIR + configFile.string());
+ fs::path exec = plugin::execname();
+ if (!exec.empty()) config_list.push_back(exec.parent_path().string() + "/../" SHARED_DATA_DIR + configFile.string());
+ ConfigList::const_iterator it = std::find_if(config_list.begin(), config_list.end(), static_cast<bool(&)(fs::path const&)>(fs::exists));
+ if (it == config_list.end()) {
+ throw std::runtime_error("Could not find default config file " + configFile.string());
+ }
+ return *it;
+}
+
Paths getPathsConfig(std::string const& confOption) {
Paths ret;
Paths const& paths = getPaths();
diff --git a/game/fs.hh b/game/fs.hh
index 6d8baa2..d0ae238 100644
--- a/game/fs.hh
+++ b/game/fs.hh
@@ -33,6 +33,9 @@ std::string getThemePath(std::string const& filename);
/** Get full path to a share file **/
std::string getPath(fs::path const& filename);
+/** Get full path to a default conguration file **/
+fs::path getDefaultConfig(fs::path const &configFile);
+
typedef std::vector<fs::path> Paths;
/** Get all shared data paths in preference order **/
|
|
From: Yoda-JM <yo...@us...> - 2010-08-06 16:51:34
|
Module: performous Branch: master Commit: 4100d6c33a736306a58835bf107f146b4b1f972b Author: Vincent Le Ligeour <yo...@us...> Date: Mon Jul 26 13:57:42 2010 +0200 Merge branch 'master' into controllers --- |
|
From: Yoda-JM <yo...@us...> - 2010-08-06 16:51:32
|
Module: performous
Branch: master
Commit: 738cadc9f01b78d2af738d83e2c8cc1624808dcd
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon Jul 26 13:20:15 2010 +0200
Added controllers description configuration file
---
data/CMakeLists.txt | 2 +
data/controllers.xml | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 190 insertions(+), 0 deletions(-)
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index f5bc718..3686029 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,6 +1,7 @@
set(APPLICATION_FILE "performous.desktop")
set(PIXMAP_FILE "performous.xpm")
set(CONFIG_FILE "schema.xml")
+set(CONTROLLERS_FILE "controllers.xml")
if(UNIX)
install(FILES ${APPLICATION_FILE} DESTINATION "share/applications/")
@@ -8,6 +9,7 @@ if(UNIX)
endif(UNIX)
install(FILES ${CONFIG_FILE} DESTINATION "${SHARE_INSTALL}/config/")
+install(FILES ${CONTROLLERS_FILE} DESTINATION "${SHARE_INSTALL}/config/")
file(GLOB XSL_FILES "*.xsl")
install(FILES ${XSL_FILES} DESTINATION "${SHARE_INSTALL}/xsl/")
diff --git a/data/controllers.xml b/data/controllers.xml
new file mode 100644
index 0000000..7129607
--- /dev/null
+++ b/data/controllers.xml
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<controllers>
+ <guitar name="GUITAR_GH">
+ <match>
+ <description>Guitar Hero 3 guitar</description>
+ <regexp match="Guitar Hero3" />
+ </match>
+ <mapping>
+ <button id="0" value="yellow" />
+ <button id="1" value="green" />
+ <button id="2" value="red" />
+ <button id="3" value="blue" />
+ <button id="4" value="orange" />
+ <button id="5" value="godmode" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </guitar>
+ <guitar name="GUITAR_RB_XBOX360">
+ <match>
+ <description>Guitar Hero X-plorer guitar</description>
+ <regexp match="Guitar Hero X-plorer" />
+ </match>
+ <match>
+ <description>Rock Band guitar Xbox 360</description>
+ <regexp match="Harmonix Guitar .* Xbox" />
+ </match>
+ <mapping>
+ <button id="0" value="green" />
+ <button id="1" value="red" />
+ <button id="2" value="blue" />
+ <button id="3" value="yellow" />
+ <button id="4" value="orange" />
+ <button id="6" value="select" />
+ <button id="7" value="start" />
+ </mapping>
+ </guitar>
+ <guitar name="GUITAR_RB_PS3">
+ <match>
+ <description>Rock Band guitar PS3</description>
+ <regexp match="Harmonix Guitar .* PlayStation" />
+ </match>
+ <mapping>
+ <button id="0" value="blue" />
+ <button id="1" value="green" />
+ <button id="2" value="red" />
+ <button id="3" value="yellow" />
+ <button id="4" value="orange" />
+ <button id="5" value="godmode" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </guitar>
+ <guitar name="GUITAR_HAMA_PS2">
+ <match>
+ <description>Hama Guitar for PS2 with converter</description>
+ <regexp match="PS Converter" />
+ </match>
+ <mapping>
+ <button id="0" value="yellow" />
+ <button id="1" value="red" />
+ <button id="2" value="blue" />
+ <button id="3" value="orange" />
+ <button id="4" value="godmode" />
+ <button id="5" value="green" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </guitar>
+ <drumkit name="DRUMS_GH">
+ <match>
+ <description>Guitar Hero 4 drum kit (guessed, could be a guitar)</description>
+ <regexp match="Guitar Hero4" />
+ </match>
+ <mapping>
+ <button id="0" value="blue" />
+ <button id="1" value="green" />
+ <button id="2" value="red" />
+ <button id="3" value="yellow" />
+ <button id="4" value="kick" />
+ <button id="5" value="green" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </drumkit>
+ <drumkit name="DRUMS_RB_PS3">
+ <match>
+ <description>RockBand Wii drum kit</description>
+ <regexp match="Harmonix Drum Controller for Nintendo Wii" />
+ </match>
+ <match>
+ <description>RockBand PS3 drum kit</description>
+ <regexp match="Harmonix Drum [Kk]it for Playstation" />
+ </match>
+ <mapping>
+ <button id="0" value="blue" />
+ <button id="1" value="green" />
+ <button id="2" value="red" />
+ <button id="3" value="yellow" />
+ <button id="4" value="kick" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </drumkit>
+ <drumkit name="DRUMS_RB_XB360">
+ <match>
+ <description>RockBand XBox drum kit</description>
+ <regexp match="Harmonix Drum [Kk]it for Xbox" />
+ </match>
+ <mapping>
+ <button id="0" value="green" />
+ <button id="1" value="red" />
+ <button id="2" value="blue" />
+ <button id="3" value="yellow" />
+ <button id="4" value="kick" />
+ <button id="6" value="select" />
+ <button id="7" value="start" />
+ </mapping>
+ </drumkit>
+ <dancepad name="DANCEPAD_GENERIC">
+ <match>
+ <description>Generic dancepad</description>
+ <regexp match="Dance mat|RedOctane USB Pad|Redoctane XBOX DDR|Positive Gaming Impact USB pad" />
+ </match>
+ <mapping>
+ <button id="0" value="left" />
+ <button id="1" value="down" />
+ <button id="2" value="up" />
+ <button id="3" value="right" />
+ <button id="4" value="up-left" />
+ <button id="5" value="up-right" />
+ <button id="6" value="down-left" />
+ <button id="7" value="down-right" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ </mapping>
+ </dancepad>
+ <dancepad name="DANCEPAD_TIGERGAME">
+ <match>
+ <description>TigerGame dancepad</description>
+ <regexp match="TigerGame" />
+ </match>
+ <mapping>
+ <button id="0" value="select" />
+ <button id="1" value="start" />
+ <button id="8" value="left" />
+ <button id="9" value="right" />
+ <button id="10" value="down" />
+ <button id="11" value="up" />
+ </mapping>
+ </dancepad>
+ <dancepad name="DANCEPAD_EMS2">
+ <match>
+ <description>EMS PS2/PC dancepad adapter</description>
+ <regexp match="0b43:0003" />
+ </match>
+ <mapping>
+ <button id="0" value="down-left" />
+ <button id="1" value="up-right" />
+ <button id="2" value="up-left" />
+ <button id="3" value="down-right" />
+ <button id="8" value="select" />
+ <button id="9" value="start" />
+ <button id="12" value="up" />
+ <button id="13" value="right" />
+ <button id="14" value="down" />
+ <button id="15" value="left" />
+ </mapping>
+ </dancepad>
+ <dancepad name="DANCEPAD_2TECH">
+ <match>
+ <description>2-tech usb dancepad</description>
+ <regexp match="USB Gamepad" />
+ </match>
+ <mapping>
+ <button id="0" value="left" />
+ <button id="1" value="down" />
+ <button id="2" value="up" />
+ <button id="3" value="right" />
+ <button id="4" value="up-left" />
+ <button id="5" value="up-right" />
+ <button id="6" value="down-left" />
+ <button id="7" value="down-right" />
+ <button id="8" value="start" />
+ <button id="9" value="select" />
+ </mapping>
+ </dancepad>
+</controllers>
|
|
From: Tapio V. <aa...@us...> - 2010-08-05 17:49:16
|
Module: performous
Branch: controllers
Commit: 23b96bb4e3356ae02cb32f6517295bba801369f6
Author: Tapio Vierros <tap...@gm...>
Date: Thu Aug 5 20:48:34 2010 +0300
Fix godmode button mapping.
---
game/joystick.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 5053d99..ead308d 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -286,7 +286,7 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
else if(value == "yellow") mapping[id] = 2;
else if(value == "blue") mapping[id] = 3;
else if(value == "orange") mapping[id] = 4;
- else if(value == "starpower") mapping[id] = 5;
+ else if(value == "godmode") mapping[id] = 5;
else if(value == "select") mapping[id] = 8;
else if(value == "start") mapping[id] = 9;
else continue;
|
|
From: Tapio V. <aa...@us...> - 2010-08-05 17:38:41
|
Module: performous
Branch: controllers
Commit: 7565ac76210114e651baf140b52ea29bcbbf97d1
Author: Tapio Vierros <tap...@gm...>
Date: Thu Aug 5 20:37:21 2010 +0300
Fix mixed-up start/select with guitars and drums.
---
game/joystick.cc | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index f9fceef..5053d99 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -287,8 +287,8 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
else if(value == "blue") mapping[id] = 3;
else if(value == "orange") mapping[id] = 4;
else if(value == "starpower") mapping[id] = 5;
- else if(value == "start") mapping[id] = 8;
- else if(value == "select") mapping[id] = 9;
+ else if(value == "select") mapping[id] = 8;
+ else if(value == "start") mapping[id] = 9;
else continue;
}
break;
@@ -304,8 +304,8 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
else if(value == "blue") mapping[id] = 3;
else if(value == "green") mapping[id] = 4;
else if(value == "orange") mapping[id] = 5;
- else if(value == "start") mapping[id] = 8;
- else if(value == "select") mapping[id] = 9;
+ else if(value == "select") mapping[id] = 8;
+ else if(value == "start") mapping[id] = 9;
else continue;
}
break;
@@ -349,7 +349,7 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
}
void input::SDL::init() {
- readControllers(g_instruments, getDefaultConfig(fs::path("/config/controllers.xml")));
+ readControllers(g_instruments, getDefaultConfig(fs::path("/config/controllers.xml")));
readControllers(g_instruments, getConfigDir() / "controllers.xml");
unsigned int sdl_id;
std::string instrument_type;
|
|
From: Yoda-JM <yo...@us...> - 2010-08-05 17:24:56
|
Module: performous
Branch: controllers
Commit: 4f9422a1e405e49c19ec0fd2b7370d9df46fe9c3
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Aug 5 19:24:40 2010 +0200
Fixed various controllers misdetection
---
data/controllers.xml | 2 +-
game/joystick.cc | 92 ++++++++++++++++---------------------------------
2 files changed, 31 insertions(+), 63 deletions(-)
diff --git a/data/controllers.xml b/data/controllers.xml
index eee2812..ab48239 100644
--- a/data/controllers.xml
+++ b/data/controllers.xml
@@ -97,7 +97,7 @@
</controller>
<controller type="drumkit" name="DRUMS_ROCKBAND_PS3">
<description>RockBand PS3 drum kit</description>
- <regexp match="Harmonix Drum [Kk]it for Playstation" />
+ <regexp match="Harmonix Drum [Kk]it for PlayStation" />
<mapping>
<button id="0" value="blue" />
<button id="1" value="green" />
diff --git a/game/joystick.cc b/game/joystick.cc
index c6c9c31..f9fceef 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -281,25 +281,15 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
int id = boost::lexical_cast<int>(getAttribute(button_elem, "id"));
std::string value = getAttribute(button_elem, "value");
if(id >= SDL_BUTTONS) break;
- if(value == "green") {
- mapping[id] = 0;
- } else if(value == "red") {
- mapping[id] = 1;
- } else if(value == "yellow") {
- mapping[id] = 2;
- } else if(value == "blue") {
- mapping[id] = 3;
- } else if(value == "orange") {
- mapping[id] = 4;
- } else if(value == "starpower") {
- mapping[id] = 5;
- } else if(value == "start") {
- mapping[id] = 8;
- } else if(value == "select") {
- mapping[id] = 9;
- } else {
- continue;
- }
+ if(value == "green") mapping[id] = 0;
+ else if(value == "red") mapping[id] = 1;
+ else if(value == "yellow") mapping[id] = 2;
+ else if(value == "blue") mapping[id] = 3;
+ else if(value == "orange") mapping[id] = 4;
+ else if(value == "starpower") mapping[id] = 5;
+ else if(value == "start") mapping[id] = 8;
+ else if(value == "select") mapping[id] = 9;
+ else continue;
}
break;
case input::DRUMS:
@@ -308,25 +298,15 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
int id = boost::lexical_cast<int>(getAttribute(button_elem, "id"));
std::string value = getAttribute(button_elem, "value");
if(id >= SDL_BUTTONS) break;
- if(value == "green") {
- mapping[id] = 0;
- } else if(value == "red") {
- mapping[id] = 1;
- } else if(value == "yellow") {
- mapping[id] = 2;
- } else if(value == "blue") {
- mapping[id] = 3;
- } else if(value == "orange") {
- mapping[id] = 4;
- } else if(value == "kick") {
- mapping[id] = 5;
- } else if(value == "start") {
- mapping[id] = 8;
- } else if(value == "select") {
- mapping[id] = 9;
- } else {
- continue;
- }
+ if(value == "kick") mapping[id] = 0;
+ else if(value == "red") mapping[id] = 1;
+ else if(value == "yellow") mapping[id] = 2;
+ else if(value == "blue") mapping[id] = 3;
+ else if(value == "green") mapping[id] = 4;
+ else if(value == "orange") mapping[id] = 5;
+ else if(value == "start") mapping[id] = 8;
+ else if(value == "select") mapping[id] = 9;
+ else continue;
}
break;
case input::DANCEPAD:
@@ -335,29 +315,17 @@ void readControllers(input::Instruments &instruments, fs::path const& file) {
int id = boost::lexical_cast<int>(getAttribute(button_elem, "id"));
std::string value = getAttribute(button_elem, "value");
if(id >= SDL_BUTTONS) break;
- if(value == "left") {
- mapping[id] = 0;
- } else if(value == "down") {
- mapping[id] = 1;
- } else if(value == "up") {
- mapping[id] = 2;
- } else if(value == "right") {
- mapping[id] = 3;
- } else if(value == "down-left") {
- mapping[id] = 4;
- } else if(value == "down-right") {
- mapping[id] = 5;
- } else if(value == "up-left") {
- mapping[id] = 6;
- } else if(value == "up-right") {
- mapping[id] = 7;
- } else if(value == "start") {
- mapping[id] = 8;
- } else if(value == "select") {
- mapping[id] = 9;
- } else {
- continue;
- }
+ if(value == "left") mapping[id] = 0;
+ else if(value == "down") mapping[id] = 1;
+ else if(value == "up") mapping[id] = 2;
+ else if(value == "right") mapping[id] = 3;
+ else if(value == "down-left") mapping[id] = 4;
+ else if(value == "down-right") mapping[id] = 5;
+ else if(value == "up-left") mapping[id] = 6;
+ else if(value == "up-right") mapping[id] = 7;
+ else if(value == "start") mapping[id] = 8;
+ else if(value == "select") mapping[id] = 9;
+ else continue;
}
break;
}
@@ -436,7 +404,7 @@ void input::SDL::init() {
for(input::Instruments::const_iterator it = g_instruments.begin() ; it != g_instruments.end() ; ++it) {
boost::regex sdl_name(it->second.match);
boost::cmatch match;
- if (regex_match(name.c_str(), match, sdl_name)) {
+ if (regex_search(name.c_str(), sdl_name)) {
std::cout << " Detected as: " << it->second.description << std::endl;
input::detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(i, input::detail::InputDevPrivate(it->second)));
found = true;
|
|
From: Yoda-JM <yo...@us...> - 2010-08-04 20:47:48
|
Module: performous
Branch: controllers
Commit: 7a4dedaa40563dd1c73c289409a29f8cd16e27fd
Author: Vincent Le Ligeour <yo...@us...>
Date: Wed Aug 4 22:47:34 2010 +0200
Fixed compilation when using portmidi
---
game/joystick.cc | 9 ++++-----
game/joystick.hh | 1 +
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index a782a1b..c6c9c31 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -3,10 +3,12 @@
#include <boost/lexical_cast.hpp>
#include <boost/regex.hpp>
+input::Instruments g_instruments;
+
#ifdef USE_PORTMIDI
input::MidiDrums::MidiDrums(): stream(pm::findDevice(true, config["system/midi_input"].s())), devnum(0x8000) {
while (detail::devices.find(devnum) != detail::devices.end()) ++devnum;
- detail::devices[devnum] = detail::InputDevPrivate(detail::DRUMS_MIDI);
+ detail::devices.insert(std::make_pair<unsigned int, input::detail::InputDevPrivate>(devnum, detail::InputDevPrivate(g_instruments.find("DRUMS_GUITARHERO")->second)));
event.type = Event::PRESS;
for (unsigned int i = 0; i < BUTTONS; ++i) event.pressed[i] = false;
#if 1
@@ -107,7 +109,7 @@ void input::MidiDrums::process() {
event.time = now();
for (unsigned int i = 0; i < BUTTONS; ++i) event.pressed[i] = false;
event.pressed[it->second] = true;
- detail::devices[devnum].addEvent(event);
+ detail::devices.find(devnum)->second.addEvent(event);
}
}
#endif
@@ -115,7 +117,6 @@ void input::MidiDrums::process() {
input::detail::InputDevs input::detail::devices;
input::SDL::SDL_devices input::SDL::sdl_devices;
-
/// Abstract navigation actions for different input devices, including keyboard
input::NavButton input::getNav(SDL_Event const &e) {
if (e.type == SDL_KEYDOWN) {
@@ -219,8 +220,6 @@ void input::SDL::init_devices() {
#include "fs.hh"
#include <libxml++/libxml++.h>
-input::Instruments g_instruments;
-
namespace {
struct XMLError {
XMLError(xmlpp::Element& e, std::string msg): elem(e), message(msg) {}
diff --git a/game/joystick.hh b/game/joystick.hh
index 2d433da..31e0f30 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -150,6 +150,7 @@ namespace input {
}
#ifdef USE_PORTMIDI
+ // Warning: MidiDrums should be instanciated after Window (that load joysticks)
class MidiDrums {
public:
static bool enabled() { return true; }
|
|
From: Yoda-JM <yo...@us...> - 2010-08-04 20:01:40
|
Module: performous Branch: controllers Commit: fffd58eb580f7c5721fd1b3c5f472bbeb9545573 Author: Vincent Le Ligeour <yo...@us...> Date: Wed Aug 4 22:01:23 2010 +0200 Implemented controllers config file --- data/controllers.xml | 166 ++++++++++++++++---------------------- game/joystick.cc | 215 ++++++++++++++++++++++++++++++++++++++++---------- game/joystick.hh | 2 +- 3 files changed, 245 insertions(+), 138 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-08-04 17:58:55
|
Module: performous
Branch: master
Commit: 9a5e53475d6530dc966baae4f29969508c5ec0de
Author: Tapio Vierros <tap...@gm...>
Date: Wed Aug 4 20:58:19 2010 +0300
Fix typo in previous commit.
---
cmake/Modules/FindGlib.cmake | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cmake/Modules/FindGlib.cmake b/cmake/Modules/FindGlib.cmake
index 607e593..b00d63e 100644
--- a/cmake/Modules/FindGlib.cmake
+++ b/cmake/Modules/FindGlib.cmake
@@ -21,7 +21,7 @@ find_path(Glib_INCLUDE_DIR
find_path(GlibConfig_INCLUDE_DIR
NAMES glibconfig.h
PATHS ${Glib_PKGCONF_INCLUDE_DIRS} /usr
- PATH_SUFFIXES /lib/glib-2.0/include ../lib/glib-2.0/include
+ PATH_SUFFIXES lib/glib-2.0/include ../lib/glib-2.0/include
)
# Finally the library itself
|
|
From: Tapio V. <aa...@us...> - 2010-08-04 16:53:21
|
Module: performous
Branch: master
Commit: 72bbe45b394d875f5252e213d8ac10c1f7270dbc
Author: Tapio Vierros <tap...@gm...>
Date: Wed Aug 4 19:51:12 2010 +0300
Make CMake find libraries' config dirs better when using wierd prefixes.
Use case: cross-compiling
---
cmake/Modules/FindGlib.cmake | 2 +-
cmake/Modules/FindGlibmm.cmake | 2 +-
cmake/Modules/FindLibXML++.cmake | 2 +-
cmake/Modules/FindLibXML2.cmake | 1 +
cmake/Modules/FindSigC++.cmake | 2 +-
5 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/cmake/Modules/FindGlib.cmake b/cmake/Modules/FindGlib.cmake
index 7344dc2..607e593 100644
--- a/cmake/Modules/FindGlib.cmake
+++ b/cmake/Modules/FindGlib.cmake
@@ -21,7 +21,7 @@ find_path(Glib_INCLUDE_DIR
find_path(GlibConfig_INCLUDE_DIR
NAMES glibconfig.h
PATHS ${Glib_PKGCONF_INCLUDE_DIRS} /usr
- PATH_SUFFIXES lib/glib-2.0/include
+ PATH_SUFFIXES /lib/glib-2.0/include ../lib/glib-2.0/include
)
# Finally the library itself
diff --git a/cmake/Modules/FindGlibmm.cmake b/cmake/Modules/FindGlibmm.cmake
index 713657d..38f272a 100644
--- a/cmake/Modules/FindGlibmm.cmake
+++ b/cmake/Modules/FindGlibmm.cmake
@@ -25,7 +25,7 @@ find_path(Glibmm_INCLUDE_DIR
find_path(GlibmmConfig_INCLUDE_DIR
NAMES glibmmconfig.h
PATHS ${Glibmm_PKGCONF_INCLUDE_DIRS} /usr
- PATH_SUFFIXES lib/glibmm-2.4/include
+ PATH_SUFFIXES lib/glibmm-2.4/include ../lib/glibmm-2.4/include
)
# Finally the library itself
diff --git a/cmake/Modules/FindLibXML++.cmake b/cmake/Modules/FindLibXML++.cmake
index 3eaa0d9..47aafda 100644
--- a/cmake/Modules/FindLibXML++.cmake
+++ b/cmake/Modules/FindLibXML++.cmake
@@ -25,7 +25,7 @@ find_path(LibXML++_INCLUDE_DIR
find_path(LibXML++Config_INCLUDE_DIR
NAMES libxml++config.h
PATHS ${LibXML++_PKGCONF_INCLUDE_DIRS} /usr
- PATH_SUFFIXES lib/libxml++-2.6/include
+ PATH_SUFFIXES lib/libxml++-2.6/include ../lib/libxml++-2.6/include
)
# Finally the library itself
diff --git a/cmake/Modules/FindLibXML2.cmake b/cmake/Modules/FindLibXML2.cmake
index fa53219..8163e70 100644
--- a/cmake/Modules/FindLibXML2.cmake
+++ b/cmake/Modules/FindLibXML2.cmake
@@ -16,6 +16,7 @@ find_path(LibXML2_INCLUDE_DIR
NAMES libxml/xpath.h
PATHS ${LibXML2_PKGCONF_INCLUDE_DIRS}
PATHS ${LibXML2_PKGCONF_INCLUDE_DIRS}/libxml2
+ PATH_SUFFIXES libxml2
)
find_library(LibXML2_LIBRARY
diff --git a/cmake/Modules/FindSigC++.cmake b/cmake/Modules/FindSigC++.cmake
index 307ec6d..24325bd 100644
--- a/cmake/Modules/FindSigC++.cmake
+++ b/cmake/Modules/FindSigC++.cmake
@@ -21,7 +21,7 @@ find_path(SigC++_INCLUDE_DIR
find_path(SigC++Config_INCLUDE_DIR
NAMES sigc++config.h
PATHS ${SigC++_PKGCONF_INCLUDE_DIRS} /usr
- PATH_SUFFIXES lib/sigc++-2.0/include
+ PATH_SUFFIXES lib/sigc++-2.0/include ../lib/sigc++-2.0/include
)
# Finally the library itself
|
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:01:21
|
Module: performous Branch: portaudio Commit: 7f4450f014ab90c03e0eeafcf4bb36206353669d Author: Tapio Vierros <tap...@gm...> Date: Wed Aug 4 18:00:04 2010 +0300 Merge branch 'master' into portaudio --- |
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:01:18
|
Module: performous
Branch: portaudio
Commit: 931c5874d4ca8fcc230a6f5e476cb1548a6e6723
Author: Fredrik Klasson <fr...@li...>
Date: Fri Jul 30 21:40:00 2010 +0200
Load the SVG if loading the cache file fails instead of aborting with a fatal error.
---
game/surface.cc | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/game/surface.cc b/game/surface.cc
index 319e0e7..d93ad08 100644
--- a/game/surface.cc
+++ b/game/surface.cc
@@ -52,7 +52,11 @@ template <typename T> void loader(T& target, fs::path name) {
// SVG file is newer we should update cache
loadSVG(target, filename, cache_filename.string());
} else {
- loadPNG(target, cache_filename.string());
+ try {
+ loadPNG(target, cache_filename.string());
+ }catch (std::runtime_error){
+ loadSVG(target, filename, cache_filename.string());
+ }
}
} else {
loadSVG(target, filename, cache_filename.string());
|
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:01:15
|
Module: performous Branch: portaudio Commit: 1f900d6846e241ba04623747f25adc66fda5b7bb Author: Vincent Le Ligeour <yo...@us...> Date: Tue Jul 27 23:59:29 2010 +0200 Added EditorOfFire ebuild --- portage-overlay/games-arcade/eof/eof-1.65.ebuild | 45 ++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/portage-overlay/games-arcade/eof/eof-1.65.ebuild b/portage-overlay/games-arcade/eof/eof-1.65.ebuild new file mode 100644 index 0000000..387898b --- /dev/null +++ b/portage-overlay/games-arcade/eof/eof-1.65.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3 + +inherit games + +DESCRIPTION="Song editor for the game Frets On Fire" +HOMEPAGE="http://www.t3-i.com/eof.htm" +SRC_URI="http://www.t3-i.com/apps/${PN}/downloads/${PN}-${PV}-linux.tar.gz" + +LICENSE="" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=" + media-libs/allegro + media-sound/vorbis-tools + media-sound/lame +" +RDEPEND="${DEPEND}" + +src_compile() { + cd "${WORKDIR}/src/" + emake -f makefile.linux || die "emake failed" +} + +src_install() { + cd "${WORKDIR}" + cat >> bin/eof.script <<-EOF + #!/bin/bash + TMP_DIR=\`mktemp -d || echo "/tmp/falback"\` + echo ">> Using \\"\${TMP_DIR}\\" as temporary location" + cp /usr/share/eof/* "\${TMP_DIR}" + cd "\${TMP_DIR}" + eof.bin + rm -rf "\${TMP_DIR}" + EOF + newbin bin/eof eof.bin + newbin bin/eof.script eof + insinto "/usr/share/${PN}" + doins bin/eof.dat bin/check.wav +} |
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:01:13
|
Module: performous
Branch: portaudio
Commit: d25e84aab8d0ef95cba85d0931e7f00d7a736fad
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jul 27 23:08:38 2010 +0300
Attempt to work around porttime problems.
---
cmake/Modules/FindPortMidi.cmake | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/cmake/Modules/FindPortMidi.cmake b/cmake/Modules/FindPortMidi.cmake
index f5126d8..e3774ad 100644
--- a/cmake/Modules/FindPortMidi.cmake
+++ b/cmake/Modules/FindPortMidi.cmake
@@ -16,6 +16,12 @@ find_library(PortMidi_LIBRARY NAMES portmidi)
find_library(PortTime_LIBRARY NAMES porttime)
set(PortMidi_PROCESS_INCLUDES PortMidi_INCLUDE_DIR)
-set(PortMidi_PROCESS_LIBS PortMidi_LIBRARY PortTime_LIBRARY)
+set(PortMidi_PROCESS_LIBS PortMidi_LIBRARY)
+# Porttime library is merged to Portmidi in new versions, so
+# we work around problems by adding it only if it's present
+if (${PortTime_LIBRARY})
+ set(PortMidi_PROCESS_LIBS PortMidi_PROCESS_LIBS PortTime_LIBRARY)
+endif (${PortTime_LIBRARY})
+
libfind_process(PortMidi)
|
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:01:10
|
Module: performous Branch: portaudio Commit: 06d781635e345cf2bd6a9a92cce71ace0a670ac6 Author: Tapio Vierros <tap...@gm...> Date: Tue Jul 27 22:36:58 2010 +0300 Add a README to the repo root to make my github mirror prettier. --- README.txt | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..df8fa33 --- /dev/null +++ b/README.txt @@ -0,0 +1,8 @@ +Performous +========== +An open-source karaoke, band and dancing game where one or more players perform a song and the game scores their performances. Supports songs in UltraStar, Frets on Fire and StepMania formats. Microphones and instruments from SingStar, Guitar Hero and Rock Band as well as some dance pads are autodetected. + +Website at http://performous.org +Wiki at http://wiki.performous.org + +For compiling instructions, see docs/Compiling.txt or visit the wiki page: http://wiki.performous.org/index.php/Building_and_installing_from_source |
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:01:08
|
Module: performous
Branch: portaudio
Commit: 330f88915c5362c8a05ecda3a5d35bec06bdaf4b
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jul 27 22:24:20 2010 +0300
Make sure paths are unique.
---
game/fs.cc | 54 +++++++++++++++++++++++++++++-------------------------
1 files changed, 29 insertions(+), 25 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index 79895c2..e56f471 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -6,6 +6,7 @@
#include <cstdlib>
#include <iostream>
#include <sstream>
+#include <algorithm>
#ifdef _WIN32
#include <windows.h>
@@ -40,31 +41,31 @@ fs::path getConfigDir() {
static bool initialized = false;
if (!initialized) {
initialized = true;
- #ifndef _WIN32
- {
- char const* conf = getenv("XDG_CONFIG_HOME");
- if (conf) dir = fs::path(conf) / "performous";
- else dir = getHomeDir() / ".config" / "performous";
- }
- #else
- {
- //open AppData directory
- std::string str;
- ITEMIDLIST* pidl;
- char AppDir[MAX_PATH];
- HRESULT hRes = SHGetSpecialFolderLocation( NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE , &pidl );
- if (hRes==NOERROR)
- {
- SHGetPathFromIDList( pidl, AppDir );
- int i;
- for(i = 0; AppDir[i] != '\0'; i++){
- if(AppDir[i] == '\\') str += '/';
- else str += AppDir[i];
- }
- dir = fs::path(str) / "performous";
- }
- }
- #endif
+ #ifndef _WIN32
+ {
+ char const* conf = getenv("XDG_CONFIG_HOME");
+ if (conf) dir = fs::path(conf) / "performous";
+ else dir = getHomeDir() / ".config" / "performous";
+ }
+ #else
+ {
+ //open AppData directory
+ std::string str;
+ ITEMIDLIST* pidl;
+ char AppDir[MAX_PATH];
+ HRESULT hRes = SHGetSpecialFolderLocation( NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE , &pidl );
+ if (hRes==NOERROR)
+ {
+ SHGetPathFromIDList( pidl, AppDir );
+ int i;
+ for(i = 0; AppDir[i] != '\0'; i++){
+ if(AppDir[i] == '\\') str += '/';
+ else str += AppDir[i];
+ }
+ dir = fs::path(str) / "performous";
+ }
+ }
+ #endif
}
return dir;
}
@@ -174,6 +175,9 @@ Paths const& getPaths(bool refresh) {
// Check if they actually exist and print debug
paths.clear();
std::remove_copy_if(dirs.begin(), dirs.end(), std::inserter(paths, paths.end()), pathNotExist);
+ // Assure that each path appears only once
+ Paths::iterator it = std::unique(paths.begin(), paths.end());
+ paths.resize(it - paths.begin());
}
return paths;
}
|
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:01:05
|
Module: performous Branch: portaudio Commit: 221264956017d8f93a4231dc44dd937758f68370 Author: Tapio Vierros <tap...@gm...> Date: Sat Jul 24 23:40:41 2010 +0300 Add a .gitignore for the cross compilation files. --- win32/cross-from-debian/.gitignore | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/win32/cross-from-debian/.gitignore b/win32/cross-from-debian/.gitignore new file mode 100644 index 0000000..b36ad51 --- /dev/null +++ b/win32/cross-from-debian/.gitignore @@ -0,0 +1,9 @@ +*.tar.gz +*.tar.bz2 +*.tgz +*.zip +deps/* +dist/* +stage/* +wine/* + |
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:00:59
|
Module: performous Branch: portaudio Commit: 6f717b2930e5e0677aba7a2a84e61780b331337b Author: Felix Bertram <fl...@be...> Date: Sun Jul 25 14:41:00 2010 -0700 remove command line parameters from performous-launcher with these, Performous doesn't launch on MacBook Pro w/ 10.5.8 --- osx-utils/resources/performous-launcher | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/osx-utils/resources/performous-launcher b/osx-utils/resources/performous-launcher index a6ff039..102dad7 100755 --- a/osx-utils/resources/performous-launcher +++ b/osx-utils/resources/performous-launcher @@ -3,4 +3,7 @@ dir=$(dirname "$0") export PATH=$PATH:"$dir" export FONTCONFIG_PATH="$dir/../Resources/etc/fonts" -performous 2>&1 --pdev pa19 --mics pa19 +# somehow this doesn't work on a MacBookPro under 10.5.8: +#performous 2>&1 --pdev pa19 --mics pa19 +# TODO: might be a good idea to turn-off all console output +performous |
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:00:57
|
Module: performous
Branch: portaudio
Commit: 999d4941623f91d57b53df3fc1b1e99506ff8fe3
Author: Felix Bertram <fl...@be...>
Date: Sun Jul 25 14:40:21 2010 -0700
fix detection of Wii instruments (guitar, drums)
---
game/joystick.cc | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 35f192f..bccd247 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -386,8 +386,8 @@ void input::SDL::init() {
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::GUITAR_RB_XB360);
} else if (name.find("Nintendo") != std::string::npos) {
// "Licensed by Nintendo of America Harmonix Guitar Controller for Nintendo Wii"
- std::cout << " Detected as: RockBand Drums PS3 (Wii Guitar)" << std::endl;
- input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DRUMS_RB_PS3);
+ std::cout << " Detected as: RockBand Guitar PS3 (Wii Guitar)" << std::endl;
+ input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::GUITAR_RB_PS3);
} else {
std::cout << " Detected as: RockBand Guitar PS3" << std::endl;
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::GUITAR_RB_PS3);
@@ -399,8 +399,8 @@ void input::SDL::init() {
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DRUMS_RB_XB360);
} else if (name.find("Nintendo") != std::string::npos) {
// Licensed by Nintendo of America Harmonix Drum Controller for Nintendo Wii
- std::cout << " Detected as: RockBand Guitar PS3 (Wii Drums)" << std::endl;
- input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::GUITAR_RB_PS3);
+ std::cout << " Detected as: RockBand Drums PS3 (Wii Drums)" << std::endl;
+ input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DRUMS_RB_PS3);
} else {
std::cout << " Detected as: RockBand Drums PS3" << std::endl;
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DRUMS_RB_PS3);
|
|
From: Tapio V. <aa...@us...> - 2010-08-04 15:00:54
|
Module: performous
Branch: portaudio
Commit: fe970e73dcaf6479c8931107a297f05c22e31236
Author: Tapio Vierros <tap...@gm...>
Date: Sat Jul 24 11:08:47 2010 +0300
Add auto-detection for Wii instruments.
---
game/joystick.cc | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 98640c1..35f192f 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -381,16 +381,26 @@ void input::SDL::init() {
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::GUITAR_GH);
} else if( name.find("Harmonix Guitar") != std::string::npos ) {
if (name.find("Xbox") != std::string::npos) {
+ // "Harmonix Guitar for Xbox360 (Controller)"
std::cout << " Detected as: RockBand Guitar Xbox360" << std::endl;
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::GUITAR_RB_XB360);
+ } else if (name.find("Nintendo") != std::string::npos) {
+ // "Licensed by Nintendo of America Harmonix Guitar Controller for Nintendo Wii"
+ std::cout << " Detected as: RockBand Drums PS3 (Wii Guitar)" << std::endl;
+ input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DRUMS_RB_PS3);
} else {
std::cout << " Detected as: RockBand Guitar PS3" << std::endl;
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::GUITAR_RB_PS3);
}
- } else if( name.find("Harmonix Drum Kit") != std::string::npos || name.find("Harmonix Drum kit") != std::string::npos) {
+ } else if( name.find("Harmonix Drum") != std::string::npos) {
+ // Kit / kit / Controller
if (name.find("Xbox") != std::string::npos) {
std::cout << " Detected as: RockBand Drums Xbox360" << std::endl;
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DRUMS_RB_XB360);
+ } else if (name.find("Nintendo") != std::string::npos) {
+ // Licensed by Nintendo of America Harmonix Drum Controller for Nintendo Wii
+ std::cout << " Detected as: RockBand Guitar PS3 (Wii Drums)" << std::endl;
+ input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::GUITAR_RB_PS3);
} else {
std::cout << " Detected as: RockBand Drums PS3" << std::endl;
input::detail::devices[i] = input::detail::InputDevPrivate(input::detail::DRUMS_RB_PS3);
|