浏览代码

Android: fix typo to register TOUCHSCREEN device (see #5322, #2718)

Sylvain 3 年之前
父节点
当前提交
14bc3bf4ec
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

+ 1 - 1
android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

@@ -1204,7 +1204,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
 
         for (int id : ids) {
             InputDevice device = InputDevice.getDevice(id);
-            if (device != null && (device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) != 0) {
+            if (device != null && (device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) == InputDevice.SOURCE_TOUCHSCREEN) {
                 nativeAddTouch(device.getId(), device.getName());
             }
         }