Skip to content

Commit cd9ca58

Browse files
committed
Joystick: Fix Android Joystick Key Map
1 parent 57326e8 commit cd9ca58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Joystick/JoystickAndroid.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,7 @@ bool JoystickAndroid::_getHat(int hat, int i) const
224224

225225
bool JoystickAndroid::init()
226226
{
227-
static QList<int> ret(_androidBtnListCount);
228-
229-
_androidBtnList = ret;
227+
QList<int> ret(_androidBtnListCount);
230228

231229
(void) AndroidInterface::cleanJavaException();
232230

@@ -258,6 +256,8 @@ bool JoystickAndroid::init()
258256
AXIS_HAT_X = QJniObject::getStaticField<jint>("android/view/MotionEvent", "AXIS_HAT_X");
259257
AXIS_HAT_Y = QJniObject::getStaticField<jint>("android/view/MotionEvent", "AXIS_HAT_Y");
260258

259+
_androidBtnList = ret;
260+
261261
return true;
262262
}
263263

0 commit comments

Comments
 (0)