diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-08-29 17:16:11 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-08-29 17:16:11 -0300 |
commit | b4acd18f3245d0e8c928b1f275847473de8a2270 (patch) | |
tree | 9482832b4e718154cf6c8f9f0a8d214f7c215e92 /main/main.cpp | |
parent | 1fecba6b5bca276054a26562402cc329ce3dff5b (diff) |
-display/emulate_touchscreen now really emulates a touchscreen
-icons to show node menus
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
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<InputDefault>(); + if (id) + id->set_emulate_touch(true); + } + } MAIN_PRINT("Main: Load Remaps"); path_remap->load_remaps(); |