mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-25 21:22:48 +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:
parent
e6300ab07a
commit
d588b97b34
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user