Required by Super Arcade Racing.
GetPointerInfo() can only succeed if WM_POINTER message are received, which can happen if there is a pointer device or EnableMouseInPointer(TRUE) is called. We don't currently send any WM_POINTER messages (and EnableMouseInPointer is a stub), so I hope adding a always failing stub won't break anything.
-- v2: user32: Add stub for GetPointerInfo().
From: Paul Gofman pgofman@codeweavers.com
--- dlls/user32/misc.c | 8 ++++++++ dlls/user32/tests/input.c | 13 +++++++++++-- dlls/user32/user32.spec | 1 + 3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index 879e8b32a0f..497d40e9dc6 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -501,6 +501,14 @@ BOOL WINAPI GetPointerType(UINT32 id, POINTER_INPUT_TYPE *type) return TRUE; }
+BOOL WINAPI GetPointerInfo(UINT32 id, POINTER_INFO *info) +{ + FIXME("(%d %p): stub\n", id, info); + + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; +} + LRESULT WINAPI ImeWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam ) { if (!imm_ime_wnd_proc) return DefWindowProcA(hwnd, msg, wParam, lParam); diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c index 09e1ca1f961..86c88520eeb 100644 --- a/dlls/user32/tests/input.c +++ b/dlls/user32/tests/input.c @@ -83,6 +83,7 @@ static struct {
static BOOL (WINAPI *pGetCurrentInputMessageSource)( INPUT_MESSAGE_SOURCE *source ); static BOOL (WINAPI *pGetPointerType)(UINT32, POINTER_INPUT_TYPE*); +static BOOL (WINAPI *pGetPointerInfo)(UINT32, POINTER_INFO*); static int (WINAPI *pGetMouseMovePointsEx) (UINT, LPMOUSEMOVEPOINT, LPMOUSEMOVEPOINT, int, DWORD); static UINT (WINAPI *pGetRawInputDeviceList) (PRAWINPUTDEVICELIST, PUINT, UINT); static UINT (WINAPI *pGetRawInputDeviceInfoW) (HANDLE, UINT, void *, UINT *); @@ -150,6 +151,7 @@ static void init_function_pointers(void)
GET_PROC(GetCurrentInputMessageSource); GET_PROC(GetMouseMovePointsEx); + GET_PROC(GetPointerInfo); GET_PROC(GetPointerType); GET_PROC(GetRawInputDeviceList); GET_PROC(GetRawInputDeviceInfoW); @@ -4440,10 +4442,11 @@ static void test_input_message_source(void) UnregisterClassA( cls.lpszClassName, GetModuleHandleA(0) ); }
-static void test_GetPointerType(void) +static void test_pointer_info(void) { BOOL ret; POINTER_INPUT_TYPE type = -1; + POINTER_INFO info; UINT id = 0;
SetLastError(0xdeadbeef); @@ -4463,6 +4466,12 @@ static void test_GetPointerType(void) ret = pGetPointerType(id, &type); ok(ret, "GetPointerType failed, got type %ld for %u.\n", type, id ); ok(type == PT_MOUSE, " type %ld\n", type ); + + /* GetPointerInfo always fails unless the app receives WM_POINTER messages. */ + SetLastError(0xdeadbeef); + ret = pGetPointerInfo(id, &info); + ok(!ret, "succeeded.\n"); + ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %lu.\n", GetLastError()); }
static void test_UnregisterDeviceNotification(void) @@ -4643,7 +4652,7 @@ START_TEST(input) SetCursorPos( pos.x, pos.y );
if(pGetPointerType) - test_GetPointerType(); + test_pointer_info(); else win_skip("GetPointerType is not available\n");
diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 1130ab457cd..6f827144935 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -359,6 +359,7 @@ @ stdcall GetParent(long) @ stdcall GetPhysicalCursorPos(ptr) @ stdcall GetPointerDevices(ptr ptr) +@ stdcall GetPointerInfo(long ptr) @ stdcall GetPointerType(long ptr) @ stdcall GetPointerTouchInfo(long ptr) @ stdcall GetPointerTouchInfoHistory(long ptr ptr)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=127044
Your paranoid android.
=== w7u_2qxl (32 bit report) ===
user32: input.c:748: Test failed: 0 (a4/0): 00 from 00 -> 80 unexpected input.c:748: Test failed: 0 (a4/0): 41 from 01 -> 00 unexpected
=== w7u_el (32 bit report) ===
user32: input.c:2406: Test failed: Spurious WM_INPUT messages
v2: - Added a small test.