From b4acd18f3245d0e8c928b1f275847473de8a2270 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 29 Aug 2015 17:16:11 -0300 Subject: -display/emulate_touchscreen now really emulates a touchscreen -icons to show node menus --- main/main.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index 19ee1c115f..805668cadd 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -75,7 +75,7 @@ #include "core/io/file_access_zip.h" #include "translation.h" #include "version.h" - +#include "os/input.h" #include "performance.h" static Globals *globals=NULL; @@ -847,6 +847,14 @@ Error Main::setup2() { GLOBAL_DEF("application/icon",String()); Globals::get_singleton()->set_custom_property_info("application/icon",PropertyInfo(Variant::STRING,"application/icon",PROPERTY_HINT_FILE,"*.png,*.webp")); + if (bool(GLOBAL_DEF("display/emulate_touchscreen",false))) { + if (!OS::get_singleton()->has_touchscreen_ui_hint() && Input::get_singleton()) { + //only if no touchscreen ui hint, set emulation + InputDefault *id = Input::get_singleton()->cast_to(); + if (id) + id->set_emulate_touch(true); + } + } MAIN_PRINT("Main: Load Remaps"); path_remap->load_remaps(); -- cgit v1.2.3