If the user has hardcoded WINVER to a version number less than
0x0602, while _WIN32_WINNT is set to 0xA00, and NTDDI_VERSION
is larger than NTDDI_WIN10_RS3, we would earlier hide the
definition of POINTER_INPUT_TYPE, but include the declarations
of functions that take a POINTER_INPUT_TYPE parameter,
leading to errors.

Since 6cfc1fd2ca2fdbbb8d6570084970bea2ef100d2e, we would set
NTDDI_VERSION to a higher version, if _WIN32_WINNT is set to 0xA00,
exposing this issue.

Change the nesting of ifdefs; include the block for checking
NTDDI_VERSION in the outer scope checking for WINVER >= 0x602.
That way, if they are set inconsistently, we'd skip the
declaration of the SyntheticPointer functions.

This matches how the ifdefs around these declarations are nested
in WinSDK.

Signed-off-by: Martin Storsjö <[email protected]>
---
 mingw-w64-headers/include/winuser.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-headers/include/winuser.h 
b/mingw-w64-headers/include/winuser.h
index 7252a53ea..d68333f7b 100644
--- a/mingw-w64-headers/include/winuser.h
+++ b/mingw-w64-headers/include/winuser.h
@@ -2954,7 +2954,6 @@ DIALOG_DPI_CHANGE_BEHAVIORS WINAPI 
GetDialogDpiChangeBehavior(HWND hDlg);
   WINUSERAPI LRESULT WINAPI PackTouchHitTestingProximityEvaluation (const 
TOUCH_HIT_TESTING_INPUT *pHitTestingInput, const 
TOUCH_HIT_TESTING_PROXIMITY_EVALUATION *pProximityEval);
   WINUSERAPI WINBOOL WINAPI GetWindowFeedbackSetting (HWND hwnd, FEEDBACK_TYPE 
feedback, DWORD dwFlags, UINT32 *pSize, VOID *config);
   WINUSERAPI WINBOOL WINAPI SetWindowFeedbackSetting (HWND hwnd, FEEDBACK_TYPE 
feedback, DWORD dwFlags, UINT32 size, CONST VOID *configuration);
-#endif
 
 #if WDK_NTDDI_VERSION >= NTDDI_WIN10_RS3
 WINUSERAPI WINBOOL WINAPI EnableMouseInPointerForThread(VOID);
@@ -2967,6 +2966,8 @@ WINUSERAPI WINBOOL WINAPI 
InjectSyntheticPointerInput(HSYNTHETICPOINTERDEVICE de
 WINUSERAPI VOID WINAPI DestroySyntheticPointerDevice(HSYNTHETICPOINTERDEVICE 
device);
 #endif /* NTDDI_VERSION >= NTDDI_WIN10_RS5 */
 
+#endif /* WINVER >= 0x0602 */
+
   typedef struct tagLASTINPUTINFO {
     UINT cbSize;
     DWORD dwTime;
-- 
2.34.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to