diff options
author | Juan Linietsky <juan@godotengine.org> | 2020-03-04 13:36:09 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-03-26 15:49:39 +0100 |
commit | 8e6960a69e0202cb1e6f3b3dc9f9bb34e1c1d889 (patch) | |
tree | 67b81f61ea79e83d7877c77a302592b9c849991e /platform/windows | |
parent | 9e08742de81b062c30b7984900a55d5150a4bd17 (diff) |
Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/os_windows.cpp | 14 | ||||
-rw-r--r-- | platform/windows/os_windows.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 041a5bffa6..c49f096ec5 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -361,14 +361,14 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) }; if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE) { - main_loop->notification(MainLoop::NOTIFICATION_WM_FOCUS_IN); + main_loop->notification(NOTIFICATION_WM_FOCUS_IN); window_focused = true; alt_mem = false; control_mem = false; shift_mem = false; } else { // WM_INACTIVE input->release_pressed_events(); - main_loop->notification(MainLoop::NOTIFICATION_WM_FOCUS_OUT); + main_loop->notification(NOTIFICATION_WM_FOCUS_OUT); window_focused = false; alt_mem = false; }; @@ -414,7 +414,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_CLOSE: // Did We Receive A Close Message? { if (main_loop) - main_loop->notification(MainLoop::NOTIFICATION_WM_QUIT_REQUEST); + main_loop->notification(NOTIFICATION_WM_CLOSE_REQUEST); //force_quit=true; return 0; // Jump Back } @@ -423,7 +423,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) old_invalid = true; outside = true; if (main_loop && mouse_mode != MOUSE_MODE_CAPTURED) - main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_EXIT); + main_loop->notification(NOTIFICATION_WM_MOUSE_EXIT); } break; case WM_INPUT: { @@ -536,7 +536,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) //mouse enter if (main_loop && mouse_mode != MOUSE_MODE_CAPTURED) - main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_ENTER); + main_loop->notification(NOTIFICATION_WM_MOUSE_ENTER); CursorShape c = cursor_shape; cursor_shape = CURSOR_MAX; @@ -630,7 +630,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) //mouse enter if (main_loop && mouse_mode != MOUSE_MODE_CAPTURED) - main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_ENTER); + main_loop->notification(NOTIFICATION_WM_MOUSE_ENTER); CursorShape c = cursor_shape; cursor_shape = CURSOR_MAX; @@ -974,7 +974,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) // When SetCapture is used, ALT+F4 hotkey is ignored by Windows, so handle it ourselves if (wParam == VK_F4 && alt_mem && (uMsg == WM_KEYDOWN || uMsg == WM_SYSKEYDOWN)) { if (main_loop) - main_loop->notification(MainLoop::NOTIFICATION_WM_QUIT_REQUEST); + main_loop->notification(NOTIFICATION_WM_CLOSE_REQUEST); } } /* diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index a7b31fa85f..d07423f2f3 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -31,7 +31,7 @@ #ifndef OS_WINDOWS_H #define OS_WINDOWS_H -#include "core/input/input.h" +#include "core/input/input_filter.h" #include "core/os/os.h" #include "core/project_settings.h" #include "crash_handler_windows.h" |