mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-30 14:10:11 +01:00
Try fix gamepad keys
This commit is contained in:
parent
eb1305dbd8
commit
28702daccc
@ -1253,18 +1253,16 @@ View.OnKeyListener, View.OnTouchListener, SensorEventListener {
|
||||
}
|
||||
}*/
|
||||
/* Handle all events as keyboard */
|
||||
if( (event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
//Log.v("SDL", "key down: " + keyCode);
|
||||
SDLActivity.onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
}
|
||||
else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
//Log.v("SDL", "key up: " + keyCode);
|
||||
SDLActivity.onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||
//Log.v("SDL", "key down: " + keyCode);
|
||||
SDLActivity.onNativeKeyDown(keyCode);
|
||||
return true;
|
||||
}
|
||||
else if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||
//Log.v("SDL", "key up: " + keyCode);
|
||||
SDLActivity.onNativeKeyUp(keyCode);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user