mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix TODO in joystick code (#15179)
This commit is contained in:
parent
58ea11c2b3
commit
6dfd61cba0
2 changed files with 7 additions and 3 deletions
|
@ -155,6 +155,11 @@ public:
|
||||||
float getMovementDirection();
|
float getMovementDirection();
|
||||||
float getMovementSpeed();
|
float getMovementSpeed();
|
||||||
|
|
||||||
|
u8 getJoystickId() const
|
||||||
|
{
|
||||||
|
return m_joystick_id;
|
||||||
|
}
|
||||||
|
|
||||||
f32 doubling_dtime;
|
f32 doubling_dtime;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -3976,10 +3976,9 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.EventType == irr::EET_JOYSTICK_INPUT_EVENT) {
|
if (event.EventType == irr::EET_JOYSTICK_INPUT_EVENT) {
|
||||||
/* TODO add a check like:
|
if (event.JoystickEvent.Joystick != m_joystick->getJoystickId())
|
||||||
if (event.JoystickEvent != joystick_we_listen_for)
|
|
||||||
return false;
|
return false;
|
||||||
*/
|
|
||||||
bool handled = m_joystick->handleEvent(event.JoystickEvent);
|
bool handled = m_joystick->handleEvent(event.JoystickEvent);
|
||||||
if (handled) {
|
if (handled) {
|
||||||
if (m_joystick->wasKeyDown(KeyType::ESC)) {
|
if (m_joystick->wasKeyDown(KeyType::ESC)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue