1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-25 21:36:15 +02:00

Removed InputManager::waitForReleasedButton()

This method was never called.

And I cannot really think of a scenario in which it is useful to wait
for any button to be released: a particular button or all buttons I can
imagine, but not any button.
This commit is contained in:
Maarten ter Huurne 2013-08-05 16:01:50 +02:00
parent e6300ab07a
commit d588b97b34
2 changed files with 1 additions and 11 deletions

View File

@ -117,16 +117,8 @@ void InputManager::readConfFile(const string &conffile) {
}
InputManager::Button InputManager::waitForPressedButton() {
return waitForButton(PRESSED);
}
InputManager::Button InputManager::waitForReleasedButton() {
return waitForButton(RELEASED);
}
InputManager::Button InputManager::waitForButton(ButtonState state) {
ButtonEvent event;
while (!waitForEvent(&event) || event.state != state);
while (!waitForEvent(&event) || event.state != PRESSED);
return event.button;
}

View File

@ -57,7 +57,6 @@ public:
void init(const std::string &conffile, Menu *menu);
bool waitForEvent(ButtonEvent *event);
Button waitForPressedButton();
Button waitForReleasedButton();
bool pollEvent(ButtonEvent *event);
private:
@ -71,7 +70,6 @@ private:
void readConfFile(const std::string &conffile);
bool getEvent(ButtonEvent *bevent, bool wait);
Button waitForButton(ButtonState state);
ButtonMapEntry buttonMap[BUTTON_TYPE_SIZE];
#ifndef SDL_JOYSTICK_DISABLED