2020-04-01 20:21:15 -07:00
|
|
|
From 9df9c77fe5f5fef1e22cf46e780de5eca8ffd274 Mon Sep 17 00:00:00 2001
|
|
|
|
From: "Ryan S. Northrup (RyNo)" <northrup@yellowapple.us>
|
|
|
|
Date: Wed, 1 Apr 2020 19:59:53 -0700
|
|
|
|
Subject: [PATCH v2] user32: Semi-stub GetMouseMovePointsEx
|
2020-04-01 18:26:41 -07:00
|
|
|
|
|
|
|
---
|
2020-04-01 20:21:15 -07:00
|
|
|
dlls/user32/input.c | 43 +++++++++++++++++++++++++++++++++++++++----
|
|
|
|
1 file changed, 39 insertions(+), 4 deletions(-)
|
2020-04-01 18:26:41 -07:00
|
|
|
|
|
|
|
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
|
2020-04-01 20:21:15 -07:00
|
|
|
index 0325e2ce3d..bf029093bf 100644
|
2020-04-01 18:26:41 -07:00
|
|
|
--- a/dlls/user32/input.c
|
|
|
|
+++ b/dlls/user32/input.c
|
2020-04-01 20:21:15 -07:00
|
|
|
@@ -1268,7 +1268,12 @@ TrackMouseEvent (TRACKMOUSEEVENT *ptme)
|
2020-04-01 18:26:41 -07:00
|
|
|
* Success: count of point set in the buffer
|
|
|
|
* Failure: -1
|
|
|
|
*/
|
|
|
|
-int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin, LPMOUSEMOVEPOINT ptout, int count, DWORD res) {
|
|
|
|
+int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin, LPMOUSEMOVEPOINT ptout, int count, DWORD res)
|
|
|
|
+{
|
|
|
|
+ POINT pos;
|
|
|
|
+ static BOOL once;
|
2020-04-01 20:21:15 -07:00
|
|
|
+ static INT last_x = 0;
|
|
|
|
+ static INT last_y = 0;
|
2020-04-01 18:26:41 -07:00
|
|
|
|
|
|
|
if((size != sizeof(MOUSEMOVEPOINT)) || (count < 0) || (count > 64)) {
|
|
|
|
SetLastError(ERROR_INVALID_PARAMETER);
|
2020-04-01 20:21:15 -07:00
|
|
|
@@ -1280,10 +1285,40 @@ int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin, LPMOUSEMOVEPOI
|
2020-04-01 18:26:41 -07:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
- FIXME("(%d %p %p %d %d) stub\n", size, ptin, ptout, count, res);
|
|
|
|
+ if (!once++)
|
|
|
|
+ FIXME("(%d %p %p %d %d) semi-stub\n", size, ptin, ptout, count, res);
|
|
|
|
+ else
|
|
|
|
+ TRACE("(%d %p %p %d %d) semi-stub\n", size, ptin, ptout, count, res);
|
|
|
|
+
|
2020-04-01 20:21:15 -07:00
|
|
|
+ TRACE(" ptin: %d %d\n", ptin->x, ptin->y);
|
|
|
|
+
|
2020-04-01 18:26:41 -07:00
|
|
|
+ if (res == GMMP_USE_HIGH_RESOLUTION_POINTS)
|
|
|
|
+ {
|
|
|
|
+ WARN("GMMP_USE_HIGH_RESOLUTION_POINTS not supported");
|
|
|
|
+ SetLastError(ERROR_POINT_NOT_FOUND);
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
2020-04-01 20:21:15 -07:00
|
|
|
|
|
|
|
- SetLastError(ERROR_POINT_NOT_FOUND);
|
|
|
|
- return -1;
|
2020-04-01 18:26:41 -07:00
|
|
|
+ GetCursorPos(&pos);
|
2020-04-01 20:21:15 -07:00
|
|
|
+
|
2020-04-01 18:26:41 -07:00
|
|
|
+ ptout[0].x = pos.x;
|
|
|
|
+ ptout[0].y = pos.y;
|
|
|
|
+ ptout[0].time = GetTickCount();
|
|
|
|
+ ptout[0].dwExtraInfo = 0;
|
2020-04-01 20:21:15 -07:00
|
|
|
+ TRACE(" ptout[0]: %d %d\n", pos.x, pos.y);
|
|
|
|
+
|
2020-04-01 18:26:41 -07:00
|
|
|
+ if (count > 1) {
|
2020-04-01 20:21:15 -07:00
|
|
|
+ ptout[1].x = last_x;
|
|
|
|
+ ptout[1].y = last_y;
|
2020-04-01 18:26:41 -07:00
|
|
|
+ ptout[1].time = GetTickCount();
|
|
|
|
+ ptout[1].dwExtraInfo = 0;
|
2020-04-01 20:21:15 -07:00
|
|
|
+ TRACE(" ptout[1]: %d %d\n", last_x, last_y);
|
2020-04-01 18:26:41 -07:00
|
|
|
+ }
|
2020-04-01 20:21:15 -07:00
|
|
|
+
|
|
|
|
+ last_x = pos.x;
|
|
|
|
+ last_y = pos.y;
|
|
|
|
+
|
2020-04-01 18:26:41 -07:00
|
|
|
+ return count > 1 ? 2 : 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
--
|
2020-04-01 20:21:15 -07:00
|
|
|
2.24.1
|
2020-04-01 18:26:41 -07:00
|
|
|
|