1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Merge pull request #94468 from m4gr3d/restart_editor_when_updating_touchscreen_settings

[Android Editor] Resolve issues with the editor touchscreen settings
This commit is contained in:
Rémi Verschelde
2024-07-17 12:24:14 +02:00
5 changed files with 7 additions and 10 deletions

View File

@@ -76,7 +76,10 @@ internal class GodotGestureHandler(private val inputHandler: GodotInputHandler)
}
override fun onLongPress(event: MotionEvent) {
contextClickRouter(event)
val toolType = GodotInputHandler.getEventToolType(event)
if (toolType != MotionEvent.TOOL_TYPE_MOUSE) {
contextClickRouter(event)
}
}
private fun contextClickRouter(event: MotionEvent) {

View File

@@ -462,7 +462,7 @@ public class GodotInputHandler implements InputManager.InputDeviceListener {
return button;
}
private static int getEventToolType(MotionEvent event) {
static int getEventToolType(MotionEvent event) {
return event.getPointerCount() > 0 ? event.getToolType(0) : MotionEvent.TOOL_TYPE_UNKNOWN;
}