Commit 13a04cdf authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

win32u: Use syscall interface for NtUserGetRawInputBuffer.

parent 5b7a862c
......@@ -1184,7 +1184,6 @@ static struct unix_funcs unix_funcs =
NtUserGetMessage,
NtUserGetPriorityClipboardFormat,
NtUserGetQueueStatus,
NtUserGetRawInputBuffer,
NtUserGetSystemMenu,
NtUserGetUpdateRect,
NtUserGetUpdateRgn,
......
......@@ -145,6 +145,7 @@ static void * const syscalls[] =
NtUserGetProcessDpiAwarenessContext,
NtUserGetProcessWindowStation,
NtUserGetProp,
NtUserGetRawInputBuffer,
NtUserGetRawInputData,
NtUserGetSystemDpiForProcess,
NtUserGetThreadDesktop,
......
......@@ -983,7 +983,7 @@
@ stdcall -syscall NtUserGetProp(long wstr)
@ stdcall NtUserGetQueueStatus(long)
@ stub NtUserGetQueueStatusReadonly
@ stdcall NtUserGetRawInputBuffer(ptr ptr long)
@ stdcall -syscall NtUserGetRawInputBuffer(ptr ptr long)
@ stdcall -syscall NtUserGetRawInputData(ptr long ptr ptr long)
@ stub NtUserGetRawInputDeviceInfo
@ stub NtUserGetRawInputDeviceList
......
......@@ -248,7 +248,6 @@ struct unix_funcs
BOOL (WINAPI *pNtUserGetMessage)( MSG *msg, HWND hwnd, UINT first, UINT last );
INT (WINAPI *pNtUserGetPriorityClipboardFormat)( UINT *list, INT count );
DWORD (WINAPI *pNtUserGetQueueStatus)( UINT flags );
UINT (WINAPI *pNtUserGetRawInputBuffer)( RAWINPUT *data, UINT *data_size, UINT header_size );
HMENU (WINAPI *pNtUserGetSystemMenu)( HWND hwnd, BOOL revert );
BOOL (WINAPI *pNtUserGetUpdateRect)( HWND hwnd, RECT *rect, BOOL erase );
INT (WINAPI *pNtUserGetUpdateRgn)( HWND hwnd, HRGN hrgn, BOOL erase );
......
......@@ -1048,12 +1048,6 @@ DWORD WINAPI NtUserGetQueueStatus( UINT flags )
return unix_funcs->pNtUserGetQueueStatus( flags );
}
UINT WINAPI DECLSPEC_HOTPATCH NtUserGetRawInputBuffer( RAWINPUT *data, UINT *data_size, UINT header_size )
{
if (!unix_funcs) return ~0u;
return unix_funcs->pNtUserGetRawInputBuffer( data, data_size, header_size );
}
BOOL WINAPI NtUserGetUpdatedClipboardFormats( UINT *formats, UINT size, UINT *out_size )
{
if (!unix_funcs) return FALSE;
......
......@@ -132,6 +132,7 @@
SYSCALL_ENTRY( NtUserGetProcessDpiAwarenessContext ) \
SYSCALL_ENTRY( NtUserGetProcessWindowStation ) \
SYSCALL_ENTRY( NtUserGetProp ) \
SYSCALL_ENTRY( NtUserGetRawInputBuffer ) \
SYSCALL_ENTRY( NtUserGetRawInputData ) \
SYSCALL_ENTRY( NtUserGetSystemDpiForProcess ) \
SYSCALL_ENTRY( NtUserGetThreadDesktop ) \
......
......@@ -957,3 +957,21 @@ NTSTATUS WINAPI wow64_NtUserGetRawInputData( UINT *args )
return ~0u;
}
}
NTSTATUS WINAPI wow64_NtUserGetRawInputBuffer( UINT *args )
{
RAWINPUT *data = get_ptr( &args );
UINT *data_size = get_ptr( &args );
UINT header_size = get_ulong( &args );
if (header_size != sizeof(RAWINPUTHEADER32))
{
SetLastError( ERROR_INVALID_PARAMETER );
return ~0u;
}
/* RAWINPUT has different sizes on 32-bit and 64-bit, but no translation is
* done. The function actually returns different structures depending on
* whether it's operating under WoW64 or not. */
return NtUserGetRawInputBuffer( data, data_size, sizeof(RAWINPUTHEADER) );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment