Preventing Bloons TD 6 from crashing on touchscreen input.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/user32/input.c | 103 ++++++++++++++++++++++++++++++++++++++++ dlls/user32/misc.c | 29 ----------- dlls/user32/user32.spec | 2 + dlls/user32/win.c | 50 ------------------- 4 files changed, 105 insertions(+), 79 deletions(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c index bb7477ed482..4bd5785ff9b 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -653,3 +653,106 @@ LRESULT WINAPI DefRawInputProc( RAWINPUT **data, INT data_count, UINT header_siz
return header_size == sizeof(RAWINPUTHEADER) ? 0 : -1; } + +/***************************************************************************** + * CloseTouchInputHandle (USER32.@) + */ +BOOL WINAPI CloseTouchInputHandle( HTOUCHINPUT handle ) +{ + FIXME( "handle %p stub!\n", handle ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +/***************************************************************************** + * GetTouchInputInfo (USER32.@) + */ +BOOL WINAPI GetTouchInputInfo( HTOUCHINPUT handle, UINT count, TOUCHINPUT *ptr, int size ) +{ + FIXME( "handle %p, count %u, ptr %p, size %u stub!\n", handle, count, ptr, size ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +/********************************************************************** + * IsTouchWindow (USER32.@) + */ +BOOL WINAPI IsTouchWindow( HWND hwnd, ULONG *flags ) +{ + FIXME( "hwnd %p, flags %p stub!\n", hwnd, flags ); + return FALSE; +} + +/***************************************************************************** + * RegisterTouchWindow (USER32.@) + */ +BOOL WINAPI RegisterTouchWindow( HWND hwnd, ULONG flags ) +{ + FIXME( "hwnd %p, flags %#lx stub!\n", hwnd, flags ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +/***************************************************************************** + * UnregisterTouchWindow (USER32.@) + */ +BOOL WINAPI UnregisterTouchWindow( HWND hwnd ) +{ + FIXME( "hwnd %p stub!\n", hwnd ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +/***************************************************************************** + * GetGestureInfo (USER32.@) + */ +BOOL WINAPI CloseGestureInfoHandle( HGESTUREINFO handle ) +{ + FIXME( "handle %p stub!\n", handle ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +/***************************************************************************** + * GetGestureInfo (USER32.@) + */ +BOOL WINAPI GetGestureExtraArgs( HGESTUREINFO handle, UINT count, BYTE *args ) +{ + FIXME( "handle %p, count %u, args %p stub!\n", handle, count, args ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +/***************************************************************************** + * GetGestureInfo (USER32.@) + */ +BOOL WINAPI GetGestureInfo( HGESTUREINFO handle, GESTUREINFO *ptr ) +{ + FIXME( "handle %p, ptr %p stub!\n", handle, ptr ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +/***************************************************************************** + * GetGestureConfig (USER32.@) + */ +BOOL WINAPI GetGestureConfig( HWND hwnd, DWORD reserved, DWORD flags, UINT *count, + GESTURECONFIG *config, UINT size ) +{ + FIXME( "handle %p, reserved %#lx, flags %#lx, count %p, config %p, size %u stub!\n", + hwnd, reserved, flags, count, config, size ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +/********************************************************************** + * SetGestureConfig (USER32.@) + */ +BOOL WINAPI SetGestureConfig( HWND hwnd, DWORD reserved, UINT count, + GESTURECONFIG *config, UINT size ) +{ + FIXME( "handle %p, reserved %#lx, count %u, config %p, size %u stub!\n", + hwnd, reserved, count, config, size ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} diff --git a/dlls/user32/misc.c b/dlls/user32/misc.c index 24adcc62b9c..879e8b32a0f 100644 --- a/dlls/user32/misc.c +++ b/dlls/user32/misc.c @@ -440,35 +440,6 @@ BOOL WINAPI UnregisterSuspendResumeNotification(HPOWERNOTIFY handle) return TRUE; }
-/***************************************************************************** - * GetGestureConfig (USER32.@) - */ -BOOL WINAPI GetGestureConfig( HWND hwnd, DWORD reserved, DWORD flags, UINT *count, GESTURECONFIG *config, UINT size ) -{ - FIXME("(%p %08lx %08lx %p %p %u): stub\n", hwnd, reserved, flags, count, config, size); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/********************************************************************** - * SetGestureConfig [USER32.@] - */ -BOOL WINAPI SetGestureConfig( HWND hwnd, DWORD reserved, UINT id, PGESTURECONFIG config, UINT size ) -{ - FIXME("(%p %08lx %u %p %u): stub\n", hwnd, reserved, id, config, size); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/********************************************************************** - * IsTouchWindow [USER32.@] - */ -BOOL WINAPI IsTouchWindow( HWND hwnd, PULONG flags ) -{ - FIXME("(%p %p): stub\n", hwnd, flags); - return FALSE; -} - /********************************************************************** * IsWindowRedirectedForPrint [USER32.@] */ diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 4f15b4c06e5..256e4c33e1c 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -76,6 +76,7 @@ @ stdcall CloseClipboard() NtUserCloseClipboard @ stdcall CloseDesktop(long) NtUserCloseDesktop @ stdcall CloseTouchInputHandle(long) +@ stdcall CloseGestureInfoHandle(long) @ stdcall CloseWindow(long) @ stdcall CloseWindowStation(long) NtUserCloseWindowStation @ stdcall CopyAcceleratorTableA(long ptr long) @@ -304,6 +305,7 @@ @ stdcall GetFocus() @ stdcall GetForegroundWindow() NtUserGetForegroundWindow @ stdcall GetGestureConfig(long long long ptr ptr long) +@ stdcall GetGestureExtraArgs(long long ptr) @ stdcall GetGestureInfo(long ptr) @ stdcall GetGUIThreadInfo(long ptr) NtUserGetGUIThreadInfo @ stdcall GetGuiResources(long long) diff --git a/dlls/user32/win.c b/dlls/user32/win.c index 3750d4b9643..383de818172 100644 --- a/dlls/user32/win.c +++ b/dlls/user32/win.c @@ -1479,56 +1479,6 @@ LONG_PTR WINAPI SetWindowLongPtrA( HWND hwnd, INT offset, LONG_PTR newval )
#endif /* _WIN64 */
-/***************************************************************************** - * RegisterTouchWindow (USER32.@) - */ -BOOL WINAPI RegisterTouchWindow(HWND hwnd, ULONG flags) -{ - FIXME("(%p %08lx): stub\n", hwnd, flags); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/***************************************************************************** - * UnregisterTouchWindow (USER32.@) - */ -BOOL WINAPI UnregisterTouchWindow(HWND hwnd) -{ - FIXME("(%p): stub\n", hwnd); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/***************************************************************************** - * CloseTouchInputHandle (USER32.@) - */ -BOOL WINAPI CloseTouchInputHandle(HTOUCHINPUT handle) -{ - FIXME("(%p): stub\n", handle); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/***************************************************************************** - * GetTouchInputInfo (USER32.@) - */ -BOOL WINAPI GetTouchInputInfo(HTOUCHINPUT handle, UINT count, TOUCHINPUT *ptr, int size) -{ - FIXME("(%p %u %p %u): stub\n", handle, count, ptr, size); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/***************************************************************************** - * GetGestureInfo (USER32.@) - */ -BOOL WINAPI GetGestureInfo(HGESTUREINFO handle, PGESTUREINFO ptr) -{ - FIXME("(%p %p): stub\n", handle, ptr); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - /***************************************************************************** * GetWindowDisplayAffinity (USER32.@) */
From: Rémi Bernon rbernon@codeweavers.com
Preventing Bloons TD 6 from crashing on touchscreen input. --- dlls/user32/input.c | 14 ++++++++++++++ dlls/user32/user32.spec | 2 ++ 2 files changed, 16 insertions(+)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c index 4bd5785ff9b..34e3a620cc5 100644 --- a/dlls/user32/input.c +++ b/dlls/user32/input.c @@ -756,3 +756,17 @@ BOOL WINAPI SetGestureConfig( HWND hwnd, DWORD reserved, UINT count, SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return FALSE; } + +BOOL WINAPI GetPointerTouchInfo( UINT32 id, POINTER_TOUCH_INFO *info ) +{ + FIXME( "id %u, info %p stub!\n", id, info ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} + +BOOL WINAPI GetPointerTouchInfoHistory( UINT32 id, UINT32 *count, POINTER_TOUCH_INFO *info ) +{ + FIXME( "id %u, count %p, info %p stub!\n", id, count, info ); + SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); + return FALSE; +} diff --git a/dlls/user32/user32.spec b/dlls/user32/user32.spec index 256e4c33e1c..88684c29506 100644 --- a/dlls/user32/user32.spec +++ b/dlls/user32/user32.spec @@ -360,6 +360,8 @@ @ stdcall GetPhysicalCursorPos(ptr) @ stdcall GetPointerDevices(ptr ptr) @ stdcall GetPointerType(long ptr) +@ stdcall GetPointerTouchInfo(long ptr) +@ stdcall GetPointerTouchInfoHistory(long ptr ptr) @ stdcall GetPriorityClipboardFormat(ptr long) NtUserGetPriorityClipboardFormat @ stdcall GetProcessDefaultLayout(ptr) @ stdcall GetProcessDpiAwarenessInternal(long 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=126131
Your paranoid android.
=== debian11 (32 bit report) ===
crypt32: cert.c:4191: Test failed: success cert.c:4192: Test failed: got 00000000 cert.c:4193: Test failed: got 00000000
On Mon Nov 14 11:28:35 2022 +0000, **** wrote:
Marvin replied on the mailing list:
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=126131 Your paranoid android. === debian11 (32 bit report) === crypt32: cert.c:4191: Test failed: success cert.c:4192: Test failed: got 00000000 cert.c:4193: Test failed: got 00000000
Spurious failure (due to some expired cert maybe?), same as the Gitlab pipeline.