summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-02 09:26:18 +0200
committerGitHub <noreply@github.com>2018-10-02 09:26:18 +0200
commit93570be2deecd81e6dcca90efc531f50c9701ed1 (patch)
tree6fc1be43b234cd3ed7c4a808d429d5f23d7dcb54 /platform
parentfb5cbf2d3004fcb66619539820d6b6db06102911 (diff)
parentdb346bff8b3355e54fd032f7bd2389b573b8378e (diff)
Merge pull request #22368 from moiman100/raw-input-fixes
Windows raw input fixes
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/os_windows.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index d575525f93..e8c209c0fc 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -458,7 +458,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
*/
}
- if (window_has_focus && main_loop)
+ if (window_has_focus && main_loop && mm->get_relative() != Vector2())
input->parse_input_event(mm);
}
delete[] lpb;
@@ -697,7 +697,7 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
last_button_state = mb->get_button_mask();
mb->set_position(Vector2(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
- if (mouse_mode == MOUSE_MODE_CAPTURED) {
+ if (mouse_mode == MOUSE_MODE_CAPTURED && !use_raw_input) {
mb->set_position(Vector2(old_x, old_y));
}