Runtime/Input/CFinalInput: Correct return value of AKey, ASpecialKey and AMouseButton

The other A-prefixed functions all return a float value, however these
are truncating float values to bool. We can amend this to prevent
potential compilation warnings.
This commit is contained in:
Lioncash 2019-08-14 02:07:00 -04:00
parent 7eb3bce499
commit e9e9de26b2
1 changed files with 3 additions and 3 deletions

View File

@ -159,9 +159,9 @@ struct CFinalInput {
bool DKey(char k) const { return m_kbm && m_kbm->m_charKeys[int(k)]; }
bool DSpecialKey(boo::ESpecialKey k) const { return m_kbm && m_kbm->m_specialKeys[int(k)]; }
bool DMouseButton(boo::EMouseButton k) const { return m_kbm && m_kbm->m_mouseButtons[int(k)]; }
bool AKey(char k) const { return DKey(k) ? 1.f : 0.f; }
bool ASpecialKey(boo::ESpecialKey k) const { return DSpecialKey(k) ? 1.f : 0.f; }
bool AMouseButton(boo::EMouseButton k) const { return DMouseButton(k) ? 1.f : 0.f; }
float AKey(char k) const { return DKey(k) ? 1.f : 0.f; }
float ASpecialKey(boo::ESpecialKey k) const { return DSpecialKey(k) ? 1.f : 0.f; }
float AMouseButton(boo::EMouseButton k) const { return DMouseButton(k) ? 1.f : 0.f; }
const std::optional<CKeyboardMouseControllerData>& GetKBM() const { return m_kbm; }
};