mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-29 10:14:06 +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() {
|
InputManager::Button InputManager::waitForPressedButton() {
|
||||||
return waitForButton(PRESSED);
|
|
||||||
}
|
|
||||||
|
|
||||||
InputManager::Button InputManager::waitForReleasedButton() {
|
|
||||||
return waitForButton(RELEASED);
|
|
||||||
}
|
|
||||||
|
|
||||||
InputManager::Button InputManager::waitForButton(ButtonState state) {
|
|
||||||
ButtonEvent event;
|
ButtonEvent event;
|
||||||
while (!waitForEvent(&event) || event.state != state);
|
while (!waitForEvent(&event) || event.state != PRESSED);
|
||||||
return event.button;
|
return event.button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,6 @@ public:
|
|||||||
void init(const std::string &conffile, Menu *menu);
|
void init(const std::string &conffile, Menu *menu);
|
||||||
bool waitForEvent(ButtonEvent *event);
|
bool waitForEvent(ButtonEvent *event);
|
||||||
Button waitForPressedButton();
|
Button waitForPressedButton();
|
||||||
Button waitForReleasedButton();
|
|
||||||
bool pollEvent(ButtonEvent *event);
|
bool pollEvent(ButtonEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -71,7 +70,6 @@ private:
|
|||||||
|
|
||||||
void readConfFile(const std::string &conffile);
|
void readConfFile(const std::string &conffile);
|
||||||
bool getEvent(ButtonEvent *bevent, bool wait);
|
bool getEvent(ButtonEvent *bevent, bool wait);
|
||||||
Button waitForButton(ButtonState state);
|
|
||||||
|
|
||||||
ButtonMapEntry buttonMap[BUTTON_TYPE_SIZE];
|
ButtonMapEntry buttonMap[BUTTON_TYPE_SIZE];
|
||||||
#ifndef SDL_JOYSTICK_DISABLED
|
#ifndef SDL_JOYSTICK_DISABLED
|
||||||
|
Loading…
Reference in New Issue
Block a user