diff --git a/src/platform/windows/input.cpp b/src/platform/windows/input.cpp index 3311264f06b..c1c25a649a0 100644 --- a/src/platform/windows/input.cpp +++ b/src/platform/windows/input.cpp @@ -506,7 +506,7 @@ namespace platf { } void - abs_mouse2(input_t &input, const touch_port_t &touch_port, float x, float y) { + abs_mouse(input_t &input, const touch_port_t &touch_port, float x, float y) { INPUT i {}; i.type = INPUT_MOUSE; @@ -528,6 +528,7 @@ namespace platf { send_input(i); } +/** void abs_mouse(input_t &input, const touch_port_t &touch_port, float x, float y) { INPUT i {}; @@ -538,6 +539,7 @@ namespace platf { mi.dy = (y * 65535) / GetSystemMetrics(SM_CYSCREEN); send_input(i); } + */ void move_mouse(input_t &input, int deltaX, int deltaY) { diff --git a/tests/unit/test_mouse.cpp b/tests/unit/test_mouse.cpp index 5f86ebe5ecf..8ad06bbcaef 100644 --- a/tests/unit/test_mouse.cpp +++ b/tests/unit/test_mouse.cpp @@ -62,7 +62,20 @@ TEST_P(MouseTest, AbsMoveInputTest) { auto old_loc = platf::get_mouse_loc(input); - platf::abs_mouse(input, platf::touch_port_t {}, mouse_pos.x, mouse_pos.y); + #ifdef _WIN32 + platf::touch_port_t abs_port { + 0, 0, + 65535, 65535 + }; + #elif __linux__ + platf::touch_port_t abs_port { + 0, 0, + 19200, 12000 + }; + #else + platf::touch_port_t abs_port { }; + #endif + platf::abs_mouse(input, abs_port, mouse_pos.x, mouse_pos.y); std::this_thread::sleep_for(std::chrono::milliseconds(200)); auto new_loc = platf::get_mouse_loc(input);