summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJuan Linietsky <juan@godotengine.org>2020-03-04 13:36:09 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-03-26 15:49:39 +0100
commit8e6960a69e0202cb1e6f3b3dc9f9bb34e1c1d889 (patch)
tree67b81f61ea79e83d7877c77a302592b9c849991e /main
parent9e08742de81b062c30b7984900a55d5150a4bd17 (diff)
Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/main/main.cpp b/main/main.cpp
index d748aad9a7..8407259124 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -32,7 +32,7 @@
#include "core/crypto/crypto.h"
#include "core/debugger/engine_debugger.h"
-#include "core/input/input.h"
+#include "core/input/input_filter.h"
#include "core/input/input_map.h"
#include "core/io/file_access_network.h"
#include "core/io/file_access_pack.h"
@@ -89,7 +89,7 @@
// Initialized in setup()
static Engine *engine = NULL;
static ProjectSettings *globals = NULL;
-static Input *input = NULL;
+static InputFilter *input = NULL;
static InputMap *input_map = NULL;
static TranslationServer *translation_server = NULL;
static Performance *performance = NULL;
@@ -1225,7 +1225,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
/* Initialize Input */
- input = memnew(Input);
+ input = memnew(InputFilter);
/* Iniitalize Display Server */
@@ -1379,7 +1379,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
GLOBAL_DEF("application/config/windows_native_icon", String());
ProjectSettings::get_singleton()->set_custom_property_info("application/config/windows_native_icon", PropertyInfo(Variant::STRING, "application/config/windows_native_icon", PROPERTY_HINT_FILE, "*.ico"));
- Input *id = Input::get_singleton();
+ InputFilter *id = InputFilter::get_singleton();
if (id) {
if (bool(GLOBAL_DEF("input_devices/pointing/emulate_touch_from_mouse", false)) && !(editor || project_manager)) {
@@ -1414,7 +1414,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) {
Ref<Texture2D> cursor = ResourceLoader::load(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image"));
if (cursor.is_valid()) {
Vector2 hotspot = ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image_hotspot");
- Input::get_singleton()->set_custom_mouse_cursor(cursor, Input::CURSOR_ARROW, hotspot);
+ InputFilter::get_singleton()->set_custom_mouse_cursor(cursor, InputFilter::CURSOR_ARROW, hotspot);
}
}
#ifdef TOOLS_ENABLED
@@ -2009,7 +2009,6 @@ bool Main::start() {
DisplayServer::get_singleton()->set_icon(icon);
}
- Input::get_singleton()->set_main_loop(main_loop);
OS::get_singleton()->set_main_loop(main_loop);
return true;