From 951090488e59a0abb3b6d87dcb576fb8bc73987a Mon Sep 17 00:00:00 2001 From: pionere Date: Tue, 19 Sep 2023 08:10:40 +0200 Subject: [PATCH] fix nightly build --- .../main/java/org/libsdl/app/SDLActivity.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java index 1cf61b2de9d..c7a2b3d0148 100644 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java @@ -93,7 +93,7 @@ public static void debugSource(int sources, String prefix) { s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class; - if (Build.VERSION.SDK_INT >= 23 /* Android 6.0 (M) */) { + if (Build.VERSION.SDK_INT >= 23 / * Android 6.0 (M) * /) { tst = InputDevice.SOURCE_BLUETOOTH_STYLUS; if ((s & tst) == tst) src += " BLUETOOTH_STYLUS"; s2 &= ~tst; @@ -107,7 +107,7 @@ public static void debugSource(int sources, String prefix) { if ((s & tst) == tst) src += " GAMEPAD"; s2 &= ~tst; - if (Build.VERSION.SDK_INT >= 21 /* Android 5.0 (LOLLIPOP) */) { + if (Build.VERSION.SDK_INT >= 21 / * Android 5.0 (LOLLIPOP) * /) { tst = InputDevice.SOURCE_HDMI; if ((s & tst) == tst) src += " HDMI"; s2 &= ~tst; @@ -125,7 +125,7 @@ public static void debugSource(int sources, String prefix) { if ((s & tst) == tst) src += " MOUSE"; s2 &= ~tst; - if (Build.VERSION.SDK_INT >= 26 /* Android 8.0 (O) */) { + if (Build.VERSION.SDK_INT >= 26 / * Android 8.0 (O) * /) { tst = InputDevice.SOURCE_MOUSE_RELATIVE; if ((s & tst) == tst) src += " MOUSE_RELATIVE"; s2 &= ~tst; @@ -146,7 +146,7 @@ public static void debugSource(int sources, String prefix) { if ((s & tst) == tst) src += " TOUCHSCREEN"; s2 &= ~tst; - if (Build.VERSION.SDK_INT >= 18 /* Android 4.3 (JELLY_BEAN_MR2) */) { + if (Build.VERSION.SDK_INT >= 18 / * Android 4.3 (JELLY_BEAN_MR2) * /) { tst = InputDevice.SOURCE_TOUCH_NAVIGATION; if ((s & tst) == tst) src += " TOUCH_NAVIGATION"; s2 &= ~tst; @@ -1359,21 +1359,21 @@ public static boolean handleKeyEvent(View v, int keyCode, KeyEvent event, InputC } } - if (event.getAction() == KeyEvent.ACTION_DOWN) { - if (isTextInputEvent(event)) { - if (ic != null) { - ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1); - } else { - SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1); - } - } - onNativeKeyDown(keyCode); - return true; - } else if (event.getAction() == KeyEvent.ACTION_UP) { - onNativeKeyUp(keyCode); - return true; - } - + if (event.getAction() == KeyEvent.ACTION_DOWN) { + if (isTextInputEvent(event)) { + if (ic != null) { + ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1); + } else { + SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1); + } + } + onNativeKeyDown(keyCode); + return true; + } else if (event.getAction() == KeyEvent.ACTION_UP) { + onNativeKeyUp(keyCode); + return true; + } + return false; }