SDLActivity.java: Compatibility fix for debugSource

I did these fixes a while ago while debuggin my application, however, forgot to send them back.
This commit is contained in:
Wohlstand 2022-06-16 22:16:11 +03:00 committed by Sam Lantinga
parent 5c1b7f6ea7
commit 68beedde92

View File

@ -94,9 +94,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class; s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
tst = InputDevice.SOURCE_BLUETOOTH_STYLUS; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if ((s & tst) == tst) src += " BLUETOOTH_STYLUS"; tst = InputDevice.SOURCE_BLUETOOTH_STYLUS;
s2 &= ~tst; if ((s & tst) == tst) src += " BLUETOOTH_STYLUS";
s2 &= ~tst;
}
tst = InputDevice.SOURCE_DPAD; tst = InputDevice.SOURCE_DPAD;
if ((s & tst) == tst) src += " DPAD"; if ((s & tst) == tst) src += " DPAD";
@ -106,9 +108,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if ((s & tst) == tst) src += " GAMEPAD"; if ((s & tst) == tst) src += " GAMEPAD";
s2 &= ~tst; s2 &= ~tst;
tst = InputDevice.SOURCE_HDMI; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if ((s & tst) == tst) src += " HDMI"; tst = InputDevice.SOURCE_HDMI;
s2 &= ~tst; if ((s & tst) == tst) src += " HDMI";
s2 &= ~tst;
}
tst = InputDevice.SOURCE_JOYSTICK; tst = InputDevice.SOURCE_JOYSTICK;
if ((s & tst) == tst) src += " JOYSTICK"; if ((s & tst) == tst) src += " JOYSTICK";
@ -143,9 +147,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if ((s & tst) == tst) src += " TOUCHSCREEN"; if ((s & tst) == tst) src += " TOUCHSCREEN";
s2 &= ~tst; s2 &= ~tst;
tst = InputDevice.SOURCE_TOUCH_NAVIGATION; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
if ((s & tst) == tst) src += " TOUCH_NAVIGATION"; tst = InputDevice.SOURCE_TOUCH_NAVIGATION;
s2 &= ~tst; if ((s & tst) == tst) src += " TOUCH_NAVIGATION";
s2 &= ~tst;
}
tst = InputDevice.SOURCE_TRACKBALL; tst = InputDevice.SOURCE_TRACKBALL;
if ((s & tst) == tst) src += " TRACKBALL"; if ((s & tst) == tst) src += " TRACKBALL";