From 6136243fec1390f09e8f0fdcc43df6185c60eafd Mon Sep 17 00:00:00 2001 From: Mis012 Date: Mon, 29 Jan 2024 14:54:58 +0100 Subject: [PATCH] api-impl: InputEvent: return stub InputDevice instead of NULL this makes touch work in Unity for games using the "new" input system --- src/api-impl/android/view/InputEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api-impl/android/view/InputEvent.java b/src/api-impl/android/view/InputEvent.java index 74f17df4..601db77c 100644 --- a/src/api-impl/android/view/InputEvent.java +++ b/src/api-impl/android/view/InputEvent.java @@ -68,7 +68,7 @@ public abstract class InputEvent { * @return The device, or null if unknown. */ public final InputDevice getDevice() { - return null /*InputDevice.getDevice(getDeviceId())*/; + return InputDevice.getDevice(0/*FIXME*/); } /**