android: tentative fix for touchscreen not working on android 14

Use more generic source test to detect touch events. Also get rid of
Retroid Pocket 2+ specific test.
Issue #1421
This commit is contained in:
Flyinghead 2024-06-22 15:07:05 +02:00
parent 83a27b9125
commit 07172416c1
1 changed files with 1 additions and 2 deletions

View File

@ -166,8 +166,7 @@ public class VirtualJoystickDelegate {
public boolean onTouchEvent(MotionEvent event, int width, int height)
{
// The Retroid Pocket 2+ is using a non-standard source
if (event.getSource() != InputDevice.SOURCE_TOUCHSCREEN && event.getSource() != 0x5002)
if ((event.getSource() & InputDevice.SOURCE_TOUCHSCREEN) != InputDevice.SOURCE_TOUCHSCREEN)
// Ignore real mice, trackballs, etc.
return false;
JNIdc.show_osd();