mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added user32-GetMouseMovePointsExuser32-GetMouseMovePointsEx patchset
This commit is contained in:
parent
755d1ca559
commit
56b4eed468
@ -273,6 +273,7 @@ patch_enable_all ()
|
||||
enable_user32_Dialog_Paint_Event="$1"
|
||||
enable_user32_DrawTextExW="$1"
|
||||
enable_user32_FlashWindowEx="$1"
|
||||
enable_user32_GetMouseMovePointsEx="$1"
|
||||
enable_user32_GetSystemMetrics="$1"
|
||||
enable_user32_Implement_CascadeWindows="$1"
|
||||
enable_user32_InternalGetWindowIcon="$1"
|
||||
@ -931,6 +932,9 @@ patch_enable ()
|
||||
user32-FlashWindowEx)
|
||||
enable_user32_FlashWindowEx="$2"
|
||||
;;
|
||||
user32-GetMouseMovePointsEx)
|
||||
enable_user32_GetMouseMovePointsEx="$2"
|
||||
;;
|
||||
user32-GetSystemMetrics)
|
||||
enable_user32_GetSystemMetrics="$2"
|
||||
;;
|
||||
@ -5902,6 +5906,21 @@ if test "$enable_user32_FlashWindowEx" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-GetMouseMovePointsEx
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#36873] Semi-stub GetMouseMovePointsEx
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/user32/input.c
|
||||
# |
|
||||
if test "$enable_user32_GetMouseMovePointsEx" -eq 1; then
|
||||
patch_apply user32-GetMouseMovePointsEx/0001-user32-Semi-stub-GetMouseMovePointsEx.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "user32: Semi-stub GetMouseMovePointsEx.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-GetSystemMetrics
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,70 @@
|
||||
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
|
||||
|
1
patches/user32-GetMouseMovePointsEx/definition
Normal file
1
patches/user32-GetMouseMovePointsEx/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [36873] Semi-stub GetMouseMovePointsEx
|
Loading…
x
Reference in New Issue
Block a user