Closed migueldeicaza closed 1 day ago
Something like this, happy to send a PR:
diff --git a/main/main.cpp b/main/main.cpp
index 9014bfad29..9f03d8faea 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -3189,8 +3189,11 @@ Error Main::setup2(bool p_show_boot_logo) {
id->set_emulate_touch_from_mouse(true);
}
}
-
- id->set_emulate_mouse_from_touch(bool(GLOBAL_DEF_BASIC("input_devices/pointing/emulate_mouse_from_touch", true)));
+ if (editor){
+ id->set_emulate_mouse_from_touch(true);
+ } else {
+ id->set_emulate_mouse_from_touch(bool(GLOBAL_DEF_BASIC("input_devices/pointing/emulate_mouse_from_touch", true)));
+ }
}
OS::get_singleton()->benchmark_end_measure("Startup", "Setup Window and Boot");
Should be consolidated to #96784.
Hello @AThousandShips you are one of those who can do it
Thank you that's true! Consolidating
Tested versions
Godot 4.4/b2b13d46c2fcd75502eec12c768caa23ee952900 (master as of Sep 28th).
System information
MacOS Sequoia, iOS
Issue description
Currently whether the emulate-mouse-input-from-touch setting (
input_devices/pointing/emulate_mouse_from_touch
) that is set for the Godot editor is derived from the project itself. The setting should govern the project itself, but should not govern the editor.I believe that for the editor, it should always be set to true as there is little reason to not map touches to mouse events, and this setting should only be honored when running the user's game.
Steps to reproduce
Disable input_devices/pointing/emulate_mouse_from_touch on the project, restart Godot, and notice that the touch input no longer works.
Minimal reproduction project (MRP)