|
@@ -1905,7 +1905,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
|
|
|
+ if ((source & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) {
|
|
|
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
|
|
if (SDLActivity.isTextInputEvent(event)) {
|
|
|
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
|
@@ -1918,7 +1918,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if ((source & InputDevice.SOURCE_MOUSE) != 0) {
|
|
|
+ if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
|
|
|
// on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
|
|
|
// they are ignored here because sending them as mouse input to SDL is messy
|
|
|
if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) {
|