[Android] Stop eating button events we don't handle.

We were eating /all/ button events except the back button. This would cause issues where Android wouldn't receive button press events for things like
volume rockers. So you couldn't change the audio ingame, even if that button isn't bound to an input.

Now we return to Android if we've handled that button press, so it works fine.
This commit is contained in:
Ryan Houdek
2015-02-22 20:36:30 -06:00
parent 4e5d115bf0
commit 29fc52cfa1
5 changed files with 18 additions and 15 deletions

View File

@ -99,7 +99,7 @@ namespace ButtonManager
_inputbinds.clear();
}
void AddBind(sBind* bind) { _inputbinds[std::make_pair(bind->_padID, bind->_buttontype)] = bind; }
void PressEvent(int button, int action);
bool PressEvent(int button, int action);
void AxisEvent(int axis, float value);
bool ButtonValue(int padID, ButtonType button);
float AxisValue(int padID, ButtonType axis);
@ -108,7 +108,7 @@ namespace ButtonManager
void Init();
bool GetButtonPressed(int padID, ButtonType button);
float GetAxisValue(int padID, ButtonType axis);
void GamepadEvent(std::string dev, int button, int action);
bool GamepadEvent(std::string dev, int button, int action);
void GamepadAxisEvent(std::string dev, int axis, float value);
void Shutdown();
}