From 6995dc553fd35aa66b4d1a40cf8be48068fdf194 Mon Sep 17 00:00:00 2001 From: seleb Date: Wed, 1 Jul 2015 01:04:53 -0400 Subject: [PATCH] fixed bumpers for virtual joystick --- S-Tengine2/Source/S-Tengine2/src/JoystickVirtual.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/S-Tengine2/Source/S-Tengine2/src/JoystickVirtual.cpp b/S-Tengine2/Source/S-Tengine2/src/JoystickVirtual.cpp index 8c63bccb..1ad9c9d3 100644 --- a/S-Tengine2/Source/S-Tengine2/src/JoystickVirtual.cpp +++ b/S-Tengine2/Source/S-Tengine2/src/JoystickVirtual.cpp @@ -57,9 +57,13 @@ void JoystickVirtual::update(Step * _step){ // bumpers if(keyboard->keyJustDown(GLFW_KEY_Q)){ - buttonDown(xbox_buttons::kL1); + buttonDownListener(xbox_buttons::kL1); + }else{ + buttonUpListener(xbox_buttons::kL1); }if(keyboard->keyJustDown(GLFW_KEY_E)){ - buttonDown(xbox_buttons::kR1); + buttonDownListener(xbox_buttons::kR1); + }else{ + buttonUpListener(xbox_buttons::kR1); } // face buttons