You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Cleanup Android input on render thread settings
Follow up to https://github.com/godotengine/godot/pull/93933 Clean up the set of settings use to control whether Android input should be dispatched on the render thread. Addresses comments in https://github.com/godotengine/godot/pull/93933#issuecomment-2210437977
This commit is contained in:
@@ -117,10 +117,6 @@ open class GodotEditor : GodotActivity() {
|
||||
val longPressEnabled = enableLongPressGestures()
|
||||
val panScaleEnabled = enablePanAndScaleGestures()
|
||||
|
||||
val useInputBuffering = useInputBuffering()
|
||||
val useAccumulatedInput = useAccumulatedInput()
|
||||
GodotLib.updateInputDispatchSettings(useAccumulatedInput, useInputBuffering)
|
||||
|
||||
checkForProjectPermissionsToEnable()
|
||||
|
||||
runOnUiThread {
|
||||
@@ -128,7 +124,6 @@ open class GodotEditor : GodotActivity() {
|
||||
godotFragment?.godot?.renderView?.inputHandler?.apply {
|
||||
enableLongPress(longPressEnabled)
|
||||
enablePanningAndScalingGestures(panScaleEnabled)
|
||||
enableInputDispatchToRenderThread(!useInputBuffering && !useAccumulatedInput)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,13 +274,6 @@ open class GodotEditor : GodotActivity() {
|
||||
protected open fun enablePanAndScaleGestures() =
|
||||
java.lang.Boolean.parseBoolean(GodotLib.getEditorSetting("interface/touchscreen/enable_pan_and_scale_gestures"))
|
||||
|
||||
/**
|
||||
* Use input buffering for the Godot Android editor.
|
||||
*/
|
||||
protected open fun useInputBuffering() = java.lang.Boolean.parseBoolean(GodotLib.getEditorSetting("interface/editor/android/use_input_buffering"))
|
||||
|
||||
protected open fun useAccumulatedInput() = java.lang.Boolean.parseBoolean(GodotLib.getEditorSetting("interface/editor/android/use_accumulated_input"))
|
||||
|
||||
/**
|
||||
* Whether we should launch the new godot instance in an adjacent window
|
||||
* @see https://developer.android.com/reference/android/content/Intent#FLAG_ACTIVITY_LAUNCH_ADJACENT
|
||||
|
||||
@@ -45,10 +45,6 @@ class GodotGame : GodotEditor() {
|
||||
|
||||
override fun enablePanAndScaleGestures() = java.lang.Boolean.parseBoolean(GodotLib.getGlobal("input_devices/pointing/android/enable_pan_and_scale_gestures"))
|
||||
|
||||
override fun useInputBuffering() = java.lang.Boolean.parseBoolean(GodotLib.getGlobal("input_devices/buffering/android/use_input_buffering"))
|
||||
|
||||
override fun useAccumulatedInput() = java.lang.Boolean.parseBoolean(GodotLib.getGlobal("input_devices/buffering/android/use_accumulated_input"))
|
||||
|
||||
override fun checkForProjectPermissionsToEnable() {
|
||||
// Nothing to do.. by the time we get here, the project permissions will have already
|
||||
// been requested by the Editor window.
|
||||
|
||||
Reference in New Issue
Block a user