|
From: Yoda-JM <yo...@us...> - 2009-08-07 08:06:47
|
Module: performous
Branch: master
Commit: 5ee73bb0602aae4ff4dbb3723dd322333f101262
Author: Vincent Le Ligeour <yo...@us...>
Date: Fri Aug 7 10:05:42 2009 +0200
Changed joystick control buttons (use START/SELECT instead of CROSS/CIRCLE)
---
game/screen_configuration.cc | 2 +-
game/screen_intro.cc | 4 ++--
game/screen_practice.cc | 2 +-
game/screen_sing.cc | 3 +++
game/screen_songs.cc | 4 ++--
5 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/game/screen_configuration.cc b/game/screen_configuration.cc
index 83eb90b..66c551d 100644
--- a/game/screen_configuration.cc
+++ b/game/screen_configuration.cc
@@ -34,7 +34,7 @@ void ScreenConfiguration::manageEvent(SDL_Event event) {
else if (key == SDLK_s && modifier & KMOD_CTRL) writeConfig();
} else if (event.type == SDL_JOYBUTTONDOWN) {
int button = event.jbutton.button;
- if (button == 2) sm->activateScreen("Intro");
+ if (button == 8) sm->activateScreen("Intro");
} else if (event.type == SDL_JOYAXISMOTION) {
int axis = event.jaxis.axis;
int value = event.jaxis.value;
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index a1a63f5..051a263 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -29,8 +29,8 @@ void ScreenIntro::manageEvent(SDL_Event event) {
else if (key == SDLK_SPACE || key == SDLK_PAUSE) m_audio.togglePause();
} else if (event.type == SDL_JOYBUTTONDOWN) {
int button = event.jbutton.button;
- if (button == 1) sm->activateScreen("Songs");
- else if (button == 2) sm->finished();
+ if (button == 9) sm->activateScreen("Songs");
+ else if (button == 8) sm->finished();
}
}
diff --git a/game/screen_practice.cc b/game/screen_practice.cc
index d738b0c..788f966 100644
--- a/game/screen_practice.cc
+++ b/game/screen_practice.cc
@@ -50,7 +50,7 @@ void ScreenPractice::manageEvent(SDL_Event event) {
}
} else if (event.type == SDL_JOYBUTTONDOWN) {
int button = event.jbutton.button;
- if (button == 2) sm->activateScreen("Intro");
+ if (button == 8) sm->activateScreen("Intro");
}
}
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 43a2275..63ac03a 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -167,6 +167,9 @@ void ScreenSing::manageEvent(SDL_Event event) {
if (seekback) {
m_layout_singer->reset();
}
+ } else if (event.type == SDL_JOYBUTTONDOWN) {
+ int button = event.jbutton.button;
+ if (button == 8 || button == 9) m_audio.togglePause();
}
}
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index b0c2203..df89a53 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -98,14 +98,14 @@ void ScreenSongs::manageEvent(SDL_Event event) {
else manageSharedKey(key, mod);
} else if (event.type == SDL_JOYBUTTONDOWN) {
int button = event.jbutton.button;
- if (button == 1) {
+ if (button == 9) {
ScreenManager* sm = ScreenManager::getSingletonPtr();
Screen* s = sm->getScreen("Sing");
ScreenSing* ss = dynamic_cast<ScreenSing*> (s);
assert(ss);
ss->setSong(m_songs.currentPtr());
sm->activateScreen("Sing");
- } else if (button == 2) {
+ } else if (button == 8) {
if (m_jukebox) {
m_jukebox = false;
} else {
|