mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
71 lines
2.2 KiB
Diff
71 lines
2.2 KiB
Diff
|
From 021f0888f1d8282229ad10dbcd1ced5ef21a266b Mon Sep 17 00:00:00 2001
|
||
|
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||
|
Date: Thu, 2 Apr 2020 12:01:34 +1100
|
||
|
Subject: [PATCH] user32: Semi-stub GetMouseMovePointsEx.
|
||
|
|
||
|
Based off patch by Ryan S. Northrup.
|
||
|
---
|
||
|
dlls/user32/input.c | 38 ++++++++++++++++++++++++++++++++++----
|
||
|
1 file changed, 34 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
|
||
|
index 97a5ada922e..e7dbe544f55 100644
|
||
|
--- a/dlls/user32/input.c
|
||
|
+++ b/dlls/user32/input.c
|
||
|
@@ -1298,7 +1298,10 @@ TrackMouseEvent (TRACKMOUSEEVENT *ptme)
|
||
|
* 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;
|
||
|
|
||
|
if((size != sizeof(MOUSEMOVEPOINT)) || (count < 0) || (count > 64)) {
|
||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||
|
@@ -1310,10 +1313,37 @@ int WINAPI GetMouseMovePointsEx(UINT size, LPMOUSEMOVEPOINT ptin, LPMOUSEMOVEPOI
|
||
|
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);
|
||
|
+
|
||
|
+ if (res == GMMP_USE_HIGH_RESOLUTION_POINTS)
|
||
|
+ {
|
||
|
+ WARN("GMMP_USE_HIGH_RESOLUTION_POINTS not supported");
|
||
|
+ SetLastError(ERROR_POINT_NOT_FOUND);
|
||
|
+ return -1;
|
||
|
+ }
|
||
|
+
|
||
|
+ if (!count)
|
||
|
+ return 0;
|
||
|
+
|
||
|
+ GetCursorPos(&pos);
|
||
|
+
|
||
|
+ ptout[0].x = pos.x;
|
||
|
+ ptout[0].y = pos.y;
|
||
|
+ ptout[0].time = GetTickCount();
|
||
|
+ ptout[0].dwExtraInfo = 0;
|
||
|
+
|
||
|
+ if (count > 1) {
|
||
|
+ /* The supplied point must be part of the output. */
|
||
|
+ ptout[1].x = ptin->x;
|
||
|
+ ptout[1].y = ptin->y;
|
||
|
+ ptout[1].time = GetTickCount();
|
||
|
+ ptout[1].dwExtraInfo = 0;
|
||
|
+ }
|
||
|
|
||
|
- SetLastError(ERROR_POINT_NOT_FOUND);
|
||
|
- return -1;
|
||
|
+ return count > 1 ? 2 : 1;
|
||
|
}
|
||
|
|
||
|
/***********************************************************************
|
||
|
--
|
||
|
2.25.1
|
||
|
|