The separate lists were added to avoid iterating device nodes if not necessary. I believe we don't need that anymore as we now keep the devices in a more efficient sequential array.
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/dinput/keyboard.c | 47 ++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 20 deletions(-)
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index 873a2d98434..6c24ddcf24b 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -83,22 +83,13 @@ static BYTE map_dik_code(DWORD scanCode, DWORD vkCode, DWORD subType, DWORD vers return (BYTE)scanCode; }
-int dinput_keyboard_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam ) +static void keyboard_handle_event( struct keyboard *impl, DWORD vkey, DWORD scan_code, BOOL up ) { - struct keyboard *impl = impl_from_IDirectInputDevice8W( iface ); BYTE new_diks, subtype = GET_DIDEVICE_SUBTYPE( impl->base.instance.dwDevType ); - int dik_code, ret = impl->base.dwCoopLevel & DISCL_EXCLUSIVE; - KBDLLHOOKSTRUCT *hook = (KBDLLHOOKSTRUCT *)lparam; - DWORD scan_code; - - if (wparam != WM_KEYDOWN && wparam != WM_KEYUP && - wparam != WM_SYSKEYDOWN && wparam != WM_SYSKEYUP) - return 0; + IDirectInputDevice8W *iface = &impl->base.IDirectInputDevice8W_iface; + int dik_code;
- TRACE( "iface %p, wparam %#Ix, lparam %#Ix, vkCode %#lx, scanCode %#lx.\n", iface, wparam, - lparam, hook->vkCode, hook->scanCode ); - - switch (hook->vkCode) + switch (vkey) { /* R-Shift is special - it is an extended key with separate scan code */ case VK_RSHIFT : dik_code = DIK_RSHIFT; break; @@ -106,25 +97,41 @@ int dinput_keyboard_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lpa case VK_NUMLOCK : dik_code = DIK_NUMLOCK; break; case VK_SUBTRACT: dik_code = DIK_SUBTRACT; break; default: - scan_code = hook->scanCode & 0xff; - if (hook->flags & LLKHF_EXTENDED) scan_code |= 0x100; - dik_code = map_dik_code( scan_code, hook->vkCode, subtype, impl->base.dinput->dwVersion ); + dik_code = map_dik_code( scan_code, vkey, subtype, impl->base.dinput->dwVersion ); + break; } - new_diks = hook->flags & LLKHF_UP ? 0 : 0x80; + new_diks = (up ? 0 : 0x80);
/* returns now if key event already known */ - if (new_diks == impl->base.device_state[dik_code]) return ret; + if (new_diks == impl->base.device_state[dik_code]) return;
impl->base.device_state[dik_code] = new_diks; - TRACE( " setting key %02x to %02x\n", dik_code, impl->base.device_state[dik_code] ); + TRACE( "setting key %02x to %02x\n", dik_code, impl->base.device_state[dik_code] );
EnterCriticalSection( &impl->base.crit ); queue_event( iface, DIDFT_MAKEINSTANCE( dik_code ) | DIDFT_PSHBUTTON, new_diks, GetCurrentTime(), impl->base.dinput->evsequence++ ); if (impl->base.hEvent) SetEvent( impl->base.hEvent ); LeaveCriticalSection( &impl->base.crit ); +} + +int dinput_keyboard_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam ) +{ + struct keyboard *impl = impl_from_IDirectInputDevice8W( iface ); + KBDLLHOOKSTRUCT *hook = (KBDLLHOOKSTRUCT *)lparam; + DWORD scan_code; + + TRACE( "iface %p, wparam %#Ix, lparam %#Ix, vkCode %#lx, scanCode %#lx.\n", iface, wparam, + lparam, hook->vkCode, hook->scanCode ); + + if (wparam != WM_KEYDOWN && wparam != WM_KEYUP && wparam != WM_SYSKEYDOWN && wparam != WM_SYSKEYUP) + return 0; + + scan_code = hook->scanCode & 0xff; + if (hook->flags & LLKHF_EXTENDED) scan_code |= 0x100; + keyboard_handle_event( impl, hook->vkCode, scan_code, hook->flags & LLKHF_UP );
- return ret; + return impl->base.dwCoopLevel & DISCL_EXCLUSIVE; }
static DWORD get_keyboard_subtype(void)
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/dinput/dinput_main.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 9af8e064dc4..0b578715d1a 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -138,24 +138,30 @@ static void dinput_device_internal_unacquire( IDirectInputDevice8W *iface, DWORD
static LRESULT CALLBACK input_thread_ll_hook_proc( int code, WPARAM wparam, LPARAM lparam ) { - struct dinput_device *impl; - int skip = 0; + struct input_thread_state *state = input_thread_state; + int i, skip = 0;
if (code != HC_ACTION) return CallNextHookEx( 0, code, wparam, lparam );
- EnterCriticalSection( &dinput_hook_crit ); - LIST_FOR_EACH_ENTRY( impl, &acquired_mouse_list, struct dinput_device, entry ) - { - TRACE( "calling dinput_mouse_hook (%p %Ix %Ix)\n", impl, wparam, lparam ); - skip |= dinput_mouse_hook( &impl->IDirectInputDevice8W_iface, wparam, lparam ); - } - LIST_FOR_EACH_ENTRY( impl, &acquired_keyboard_list, struct dinput_device, entry ) + for (i = state->events_count; i < state->devices_count; ++i) { - if (impl->use_raw_input) continue; - TRACE( "calling dinput_keyboard_hook (%p %Ix %Ix)\n", impl, wparam, lparam ); - skip |= dinput_keyboard_hook( &impl->IDirectInputDevice8W_iface, wparam, lparam ); + struct dinput_device *device = state->devices[i]; + if (device->use_raw_input) continue; + if (device->instance.dwDevType & DIDEVTYPE_HID) continue; + switch (GET_DIDEVICE_TYPE( device->instance.dwDevType )) + { + case DIDEVTYPE_MOUSE: + case DI8DEVTYPE_MOUSE: + TRACE( "calling dinput_mouse_hook (%p %Ix %Ix)\n", device, wparam, lparam ); + skip |= dinput_mouse_hook( &device->IDirectInputDevice8W_iface, wparam, lparam ); + break; + case DIDEVTYPE_KEYBOARD: + case DI8DEVTYPE_KEYBOARD: + TRACE( "calling dinput_keyboard_hook (%p %Ix %Ix)\n", device, wparam, lparam ); + skip |= dinput_keyboard_hook( &device->IDirectInputDevice8W_iface, wparam, lparam ); + break; + } } - LeaveCriticalSection( &dinput_hook_crit );
return skip ? 1 : CallNextHookEx( 0, code, wparam, lparam ); } @@ -248,18 +254,19 @@ static void input_thread_update_device_list( struct input_thread_state *state ) if (device->dwCoopLevel & DISCL_EXCLUSIVE) rawinput_mouse.dwFlags |= RIDEV_NOLEGACY | RIDEV_CAPTUREMOUSE; rawinput_mouse.dwFlags &= ~RIDEV_REMOVE; rawinput_mouse.hwndTarget = di_em_win; - dinput_device_internal_addref( (state->devices[count] = device) ); - if (++count >= INPUT_THREAD_MAX_DEVICES) break; + if (count < INPUT_THREAD_MAX_DEVICES) dinput_device_internal_addref( (state->devices[count++] = device) ); } LIST_FOR_EACH_ENTRY( device, &acquired_mouse_list, struct dinput_device, entry ) { if (device->dwCoopLevel & DISCL_FOREGROUND) foreground_count++; mouse_count++; + if (count < INPUT_THREAD_MAX_DEVICES) dinput_device_internal_addref( (state->devices[count++] = device) ); } LIST_FOR_EACH_ENTRY( device, &acquired_keyboard_list, struct dinput_device, entry ) { if (device->dwCoopLevel & DISCL_FOREGROUND) foreground_count++; keyboard_count++; + if (count < INPUT_THREAD_MAX_DEVICES) dinput_device_internal_addref( (state->devices[count++] = device) ); } state->devices_count = count; LeaveCriticalSection( &dinput_hook_crit );
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/dinput/dinput_main.c | 47 ++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 0b578715d1a..cf0d8841424 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -89,7 +89,6 @@ static CRITICAL_SECTION_DEBUG dinput_critsect_debug = static CRITICAL_SECTION dinput_hook_crit = { &dinput_critsect_debug, -1, 0, 0, 0, 0 };
static struct list acquired_mouse_list = LIST_INIT( acquired_mouse_list ); -static struct list acquired_rawmouse_list = LIST_INIT( acquired_rawmouse_list ); static struct list acquired_keyboard_list = LIST_INIT( acquired_keyboard_list ); static struct list acquired_device_list = LIST_INIT( acquired_device_list );
@@ -99,7 +98,7 @@ void dinput_hooks_acquire_device( IDirectInputDevice8W *iface )
EnterCriticalSection( &dinput_hook_crit ); if (IsEqualGUID( &impl->guid, &GUID_SysMouse )) - list_add_tail( impl->use_raw_input ? &acquired_rawmouse_list : &acquired_mouse_list, &impl->entry ); + list_add_tail( &acquired_mouse_list, &impl->entry ); else if (IsEqualGUID( &impl->guid, &GUID_SysKeyboard )) list_add_tail( &acquired_keyboard_list, &impl->entry ); else @@ -184,12 +183,6 @@ static void dinput_unacquire_window_devices( HWND window ) TRACE( "%p window is not foreground - unacquiring %p\n", impl->win, impl ); dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); } - LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_rawmouse_list, struct dinput_device, entry ) - { - if (window != impl->win) continue; - TRACE( "%p window is not foreground - unacquiring %p\n", impl->win, impl ); - dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); - } LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_keyboard_list, struct dinput_device, entry ) { if (window != impl->win) continue; @@ -210,8 +203,6 @@ static void dinput_unacquire_devices(void) dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_mouse_list, struct dinput_device, entry ) dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); - LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_rawmouse_list, struct dinput_device, entry ) - dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_keyboard_list, struct dinput_device, entry ) dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED );
@@ -233,7 +224,7 @@ static LRESULT CALLBACK cbt_hook_proc( int code, WPARAM wparam, LPARAM lparam ) static void input_thread_update_device_list( struct input_thread_state *state ) { RAWINPUTDEVICE rawinput_mouse = {.usUsagePage = HID_USAGE_PAGE_GENERIC, .usUsage = HID_USAGE_GENERIC_MOUSE, .dwFlags = RIDEV_REMOVE}; - UINT count = 0, keyboard_count = 0, mouse_count = 0, foreground_count = 0; + UINT count = 0, keyboard_count = 0, mouse_ll_count = 0, foreground_count = 0; struct dinput_device *device;
EnterCriticalSection( &dinput_hook_crit ); @@ -247,19 +238,29 @@ static void input_thread_update_device_list( struct input_thread_state *state ) } state->events_count = count;
- LIST_FOR_EACH_ENTRY( device, &acquired_rawmouse_list, struct dinput_device, entry ) - { - if (device->dwCoopLevel & DISCL_FOREGROUND) foreground_count++; - if (device->dwCoopLevel & DISCL_BACKGROUND) rawinput_mouse.dwFlags |= RIDEV_INPUTSINK; - if (device->dwCoopLevel & DISCL_EXCLUSIVE) rawinput_mouse.dwFlags |= RIDEV_NOLEGACY | RIDEV_CAPTUREMOUSE; - rawinput_mouse.dwFlags &= ~RIDEV_REMOVE; - rawinput_mouse.hwndTarget = di_em_win; - if (count < INPUT_THREAD_MAX_DEVICES) dinput_device_internal_addref( (state->devices[count++] = device) ); - } LIST_FOR_EACH_ENTRY( device, &acquired_mouse_list, struct dinput_device, entry ) { + RAWINPUTDEVICE *rawinput_device = NULL; if (device->dwCoopLevel & DISCL_FOREGROUND) foreground_count++; - mouse_count++; + + switch (GET_DIDEVICE_TYPE( device->instance.dwDevType )) + { + case DIDEVTYPE_MOUSE: + case DI8DEVTYPE_MOUSE: + if (device->dwCoopLevel & DISCL_EXCLUSIVE) rawinput_mouse.dwFlags |= RIDEV_CAPTUREMOUSE; + if (!device->use_raw_input) mouse_ll_count++; + else rawinput_device = &rawinput_mouse; + break; + } + + if (rawinput_device) + { + if (device->dwCoopLevel & DISCL_BACKGROUND) rawinput_device->dwFlags |= RIDEV_INPUTSINK; + if (device->dwCoopLevel & DISCL_EXCLUSIVE) rawinput_device->dwFlags |= RIDEV_NOLEGACY; + rawinput_device->dwFlags &= ~RIDEV_REMOVE; + rawinput_device->hwndTarget = di_em_win; + } + if (count < INPUT_THREAD_MAX_DEVICES) dinput_device_internal_addref( (state->devices[count++] = device) ); } LIST_FOR_EACH_ENTRY( device, &acquired_keyboard_list, struct dinput_device, entry ) @@ -287,9 +288,9 @@ static void input_thread_update_device_list( struct input_thread_state *state ) state->keyboard_ll_hook = NULL; }
- if (mouse_count && !state->mouse_ll_hook) + if (mouse_ll_count && !state->mouse_ll_hook) state->mouse_ll_hook = SetWindowsHookExW( WH_MOUSE_LL, input_thread_ll_hook_proc, DINPUT_instance, 0 ); - else if (!mouse_count && state->mouse_ll_hook) + else if (!mouse_ll_count && state->mouse_ll_hook) { UnhookWindowsHookEx( state->mouse_ll_hook ); state->mouse_ll_hook = NULL;
From: Rémi Bernon rbernon@codeweavers.com
This is no longer needed as an optimization. --- dlls/dinput/dinput_main.c | 45 +++++++++------------------------------ 1 file changed, 10 insertions(+), 35 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index cf0d8841424..15ab2fe3dce 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -88,8 +88,6 @@ static CRITICAL_SECTION_DEBUG dinput_critsect_debug = }; static CRITICAL_SECTION dinput_hook_crit = { &dinput_critsect_debug, -1, 0, 0, 0, 0 };
-static struct list acquired_mouse_list = LIST_INIT( acquired_mouse_list ); -static struct list acquired_keyboard_list = LIST_INIT( acquired_keyboard_list ); static struct list acquired_device_list = LIST_INIT( acquired_device_list );
void dinput_hooks_acquire_device( IDirectInputDevice8W *iface ) @@ -97,12 +95,7 @@ void dinput_hooks_acquire_device( IDirectInputDevice8W *iface ) struct dinput_device *impl = impl_from_IDirectInputDevice8W( iface );
EnterCriticalSection( &dinput_hook_crit ); - if (IsEqualGUID( &impl->guid, &GUID_SysMouse )) - list_add_tail( &acquired_mouse_list, &impl->entry ); - else if (IsEqualGUID( &impl->guid, &GUID_SysKeyboard )) - list_add_tail( &acquired_keyboard_list, &impl->entry ); - else - list_add_tail( &acquired_device_list, &impl->entry ); + list_add_tail( &acquired_device_list, &impl->entry ); LeaveCriticalSection( &dinput_hook_crit );
SendMessageW( di_em_win, INPUT_THREAD_NOTIFY, NOTIFY_REFRESH_DEVICES, 0 ); @@ -177,18 +170,6 @@ static void dinput_unacquire_window_devices( HWND window ) TRACE( "%p window is not foreground - unacquiring %p\n", impl->win, impl ); dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); } - LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_mouse_list, struct dinput_device, entry ) - { - if (window != impl->win) continue; - TRACE( "%p window is not foreground - unacquiring %p\n", impl->win, impl ); - dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); - } - LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_keyboard_list, struct dinput_device, entry ) - { - if (window != impl->win) continue; - TRACE( "%p window is not foreground - unacquiring %p\n", impl->win, impl ); - dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); - }
LeaveCriticalSection( &dinput_hook_crit ); } @@ -201,10 +182,6 @@ static void dinput_unacquire_devices(void)
LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_device_list, struct dinput_device, entry ) dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); - LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_mouse_list, struct dinput_device, entry ) - dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED ); - LIST_FOR_EACH_ENTRY_SAFE( impl, next, &acquired_keyboard_list, struct dinput_device, entry ) - dinput_device_internal_unacquire( &impl->IDirectInputDevice8W_iface, STATUS_UNACQUIRED );
LeaveCriticalSection( &dinput_hook_crit ); } @@ -224,7 +201,7 @@ static LRESULT CALLBACK cbt_hook_proc( int code, WPARAM wparam, LPARAM lparam ) static void input_thread_update_device_list( struct input_thread_state *state ) { RAWINPUTDEVICE rawinput_mouse = {.usUsagePage = HID_USAGE_PAGE_GENERIC, .usUsage = HID_USAGE_GENERIC_MOUSE, .dwFlags = RIDEV_REMOVE}; - UINT count = 0, keyboard_count = 0, mouse_ll_count = 0, foreground_count = 0; + UINT count = 0, keyboard_ll_count = 0, mouse_ll_count = 0, foreground_count = 0; struct dinput_device *device;
EnterCriticalSection( &dinput_hook_crit ); @@ -238,11 +215,11 @@ static void input_thread_update_device_list( struct input_thread_state *state ) } state->events_count = count;
- LIST_FOR_EACH_ENTRY( device, &acquired_mouse_list, struct dinput_device, entry ) + LIST_FOR_EACH_ENTRY( device, &acquired_device_list, struct dinput_device, entry ) { RAWINPUTDEVICE *rawinput_device = NULL; - if (device->dwCoopLevel & DISCL_FOREGROUND) foreground_count++;
+ if (device->read_event && device->vtbl->read) continue; switch (GET_DIDEVICE_TYPE( device->instance.dwDevType )) { case DIDEVTYPE_MOUSE: @@ -251,6 +228,10 @@ static void input_thread_update_device_list( struct input_thread_state *state ) if (!device->use_raw_input) mouse_ll_count++; else rawinput_device = &rawinput_mouse; break; + case DIDEVTYPE_KEYBOARD: + case DI8DEVTYPE_KEYBOARD: + if (!device->use_raw_input) keyboard_ll_count++; + break; }
if (rawinput_device) @@ -263,12 +244,6 @@ static void input_thread_update_device_list( struct input_thread_state *state )
if (count < INPUT_THREAD_MAX_DEVICES) dinput_device_internal_addref( (state->devices[count++] = device) ); } - LIST_FOR_EACH_ENTRY( device, &acquired_keyboard_list, struct dinput_device, entry ) - { - if (device->dwCoopLevel & DISCL_FOREGROUND) foreground_count++; - keyboard_count++; - if (count < INPUT_THREAD_MAX_DEVICES) dinput_device_internal_addref( (state->devices[count++] = device) ); - } state->devices_count = count; LeaveCriticalSection( &dinput_hook_crit );
@@ -280,9 +255,9 @@ static void input_thread_update_device_list( struct input_thread_state *state ) state->callwndproc_hook = NULL; }
- if (keyboard_count && !state->keyboard_ll_hook) + if (keyboard_ll_count && !state->keyboard_ll_hook) state->keyboard_ll_hook = SetWindowsHookExW( WH_KEYBOARD_LL, input_thread_ll_hook_proc, DINPUT_instance, 0 ); - else if (!keyboard_count && state->keyboard_ll_hook) + else if (!keyboard_ll_count && state->keyboard_ll_hook) { UnhookWindowsHookEx( state->keyboard_ll_hook ); state->keyboard_ll_hook = NULL;
From: Rémi Bernon rbernon@codeweavers.com
--- dlls/dinput/dinput_main.c | 17 ++++++++++++++++- dlls/dinput/dinput_private.h | 2 ++ dlls/dinput/keyboard.c | 15 +++++++++++++++ dlls/dinput/tests/device8.c | 11 ----------- 4 files changed, 33 insertions(+), 12 deletions(-)
diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 15ab2fe3dce..42541b9084a 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -200,6 +200,7 @@ static LRESULT CALLBACK cbt_hook_proc( int code, WPARAM wparam, LPARAM lparam )
static void input_thread_update_device_list( struct input_thread_state *state ) { + RAWINPUTDEVICE rawinput_keyboard = {.usUsagePage = HID_USAGE_PAGE_GENERIC, .usUsage = HID_USAGE_GENERIC_KEYBOARD, .dwFlags = RIDEV_REMOVE}; RAWINPUTDEVICE rawinput_mouse = {.usUsagePage = HID_USAGE_PAGE_GENERIC, .usUsage = HID_USAGE_GENERIC_MOUSE, .dwFlags = RIDEV_REMOVE}; UINT count = 0, keyboard_ll_count = 0, mouse_ll_count = 0, foreground_count = 0; struct dinput_device *device; @@ -230,7 +231,9 @@ static void input_thread_update_device_list( struct input_thread_state *state ) break; case DIDEVTYPE_KEYBOARD: case DI8DEVTYPE_KEYBOARD: + if (device->dwCoopLevel & DISCL_EXCLUSIVE) rawinput_keyboard.dwFlags |= RIDEV_NOHOTKEYS; if (!device->use_raw_input) keyboard_ll_count++; + else rawinput_device = &rawinput_keyboard; break; }
@@ -274,8 +277,12 @@ static void input_thread_update_device_list( struct input_thread_state *state ) if (!rawinput_mouse.hwndTarget != !state->rawinput_devices[0].hwndTarget && !RegisterRawInputDevices( &rawinput_mouse, 1, sizeof(RAWINPUTDEVICE) )) WARN( "Failed to (un)register rawinput mouse device.\n" ); + if (!rawinput_keyboard.hwndTarget != !state->rawinput_devices[1].hwndTarget && + !RegisterRawInputDevices( &rawinput_keyboard, 1, sizeof(RAWINPUTDEVICE) )) + WARN( "Failed to (un)register rawinput mouse device.\n" );
state->rawinput_devices[0] = rawinput_mouse; + state->rawinput_devices[1] = rawinput_keyboard; }
static LRESULT WINAPI di_em_win_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) @@ -292,7 +299,9 @@ static LRESULT WINAPI di_em_win_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR size = GetRawInputData( (HRAWINPUT)lparam, RID_INPUT, &ri, &size, sizeof(RAWINPUTHEADER) ); if (size == (UINT)-1 || size < sizeof(RAWINPUTHEADER)) WARN( "Unable to read raw input data\n" ); - else if (ri.header.dwType == RIM_TYPEMOUSE) + else if (ri.header.dwType == RIM_TYPEHID) + WARN( "Unexpected HID rawinput message\n" ); + else { for (i = state->events_count; i < state->devices_count; ++i) { @@ -303,8 +312,14 @@ static LRESULT WINAPI di_em_win_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPAR { case DIDEVTYPE_MOUSE: case DI8DEVTYPE_MOUSE: + if (ri.header.dwType != RIM_TYPEMOUSE) break; dinput_mouse_rawinput_hook( &device->IDirectInputDevice8W_iface, wparam, lparam, &ri ); break; + case DIDEVTYPE_KEYBOARD: + case DI8DEVTYPE_KEYBOARD: + if (ri.header.dwType != RIM_TYPEKEYBOARD) break; + dinput_keyboard_rawinput_hook( &device->IDirectInputDevice8W_iface, wparam, lparam, &ri ); + break; default: break; } } diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h index 6e7ffeb0841..944d12b860f 100644 --- a/dlls/dinput/dinput_private.h +++ b/dlls/dinput/dinput_private.h @@ -72,6 +72,8 @@ extern int dinput_mouse_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM extern int dinput_keyboard_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam ); extern void dinput_mouse_rawinput_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam, RAWINPUT *raw ); +extern void dinput_keyboard_rawinput_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam, + RAWINPUT *raw );
extern void check_dinput_events(void) DECLSPEC_HIDDEN;
diff --git a/dlls/dinput/keyboard.c b/dlls/dinput/keyboard.c index 6c24ddcf24b..c49796cfa2d 100644 --- a/dlls/dinput/keyboard.c +++ b/dlls/dinput/keyboard.c @@ -115,6 +115,18 @@ static void keyboard_handle_event( struct keyboard *impl, DWORD vkey, DWORD scan LeaveCriticalSection( &impl->base.crit ); }
+void dinput_keyboard_rawinput_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam, RAWINPUT *ri ) +{ + struct keyboard *impl = impl_from_IDirectInputDevice8W( iface ); + DWORD scan_code; + + TRACE("(%p) wparam %Ix, lparam %Ix\n", iface, wparam, lparam); + + scan_code = ri->data.keyboard.MakeCode & 0xff; + if (ri->data.keyboard.Flags & RI_KEY_E0) scan_code |= 0x100; + keyboard_handle_event( impl, ri->data.keyboard.VKey, scan_code, ri->data.keyboard.Flags & RI_KEY_BREAK ); +} + int dinput_keyboard_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam ) { struct keyboard *impl = impl_from_IDirectInputDevice8W( iface ); @@ -189,6 +201,9 @@ HRESULT keyboard_create_device( struct dinput *dinput, const GUID *guid, IDirect impl->base.caps.dwFirmwareRevision = 100; impl->base.caps.dwHardwareRevision = 100;
+ if (dinput->dwVersion >= 0x0800) + impl->base.use_raw_input = TRUE; + *out = &impl->base.IDirectInputDevice8W_iface; return DI_OK; } diff --git a/dlls/dinput/tests/device8.c b/dlls/dinput/tests/device8.c index 449402621a7..1f29c9af519 100644 --- a/dlls/dinput/tests/device8.c +++ b/dlls/dinput/tests/device8.c @@ -1099,15 +1099,11 @@ static void test_mouse_keyboard(void) raw_devices_count = ARRAY_SIZE(raw_devices); memset(raw_devices, 0, sizeof(raw_devices)); hr = GetRegisteredRawInputDevices(raw_devices, &raw_devices_count, sizeof(RAWINPUTDEVICE)); - todo_wine ok(hr == 1, "GetRegisteredRawInputDevices returned %ld, raw_devices_count: %d\n", hr, raw_devices_count); - todo_wine ok(raw_devices[0].usUsagePage == HID_USAGE_PAGE_GENERIC, "got usUsagePage: %x\n", raw_devices[0].usUsagePage); - todo_wine ok(raw_devices[0].usUsage == HID_USAGE_GENERIC_KEYBOARD, "got usUsage: %x\n", raw_devices[0].usUsage); todo_wine ok(raw_devices[0].dwFlags == RIDEV_INPUTSINK, "Unexpected raw device flags: %#lx\n", raw_devices[0].dwFlags); - todo_wine ok(raw_devices[0].hwndTarget != NULL, "Unexpected raw device target: %p\n", raw_devices[0].hwndTarget); hr = IDirectInputDevice8_Unacquire(di_keyboard); ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %#lx\n", hr); @@ -1139,7 +1135,6 @@ static void test_mouse_keyboard(void) ok(raw_devices[0].usUsagePage == HID_USAGE_PAGE_GENERIC, "got usUsagePage: %x\n", raw_devices[0].usUsagePage); ok(raw_devices[0].usUsage == HID_USAGE_GENERIC_MOUSE, "got usUsage: %x\n", raw_devices[0].usUsage); ok(raw_devices[0].dwFlags == RIDEV_INPUTSINK, "Unexpected raw device flags: %#lx\n", raw_devices[0].dwFlags); - todo_wine ok(raw_devices[0].hwndTarget == di_hwnd, "Unexpected raw device target: %p\n", raw_devices[0].hwndTarget); hr = IDirectInputDevice8_Unacquire(di_mouse); ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %#lx\n", hr); @@ -1185,9 +1180,6 @@ static void test_mouse_keyboard(void) ok(raw_devices[1].hwndTarget == hwnd, "Unexpected raw device target: %p\n", raw_devices[1].hwndTarget); ok(raw_devices[2].usUsagePage == HID_USAGE_PAGE_GENERIC, "got usUsagePage: %x\n", raw_devices[1].usUsagePage); ok(raw_devices[2].usUsage == HID_USAGE_GENERIC_KEYBOARD, "got usUsage: %x\n", raw_devices[1].usUsage); - todo_wine - ok(raw_devices[2].dwFlags == RIDEV_INPUTSINK, "Unexpected raw device flags: %#lx\n", raw_devices[1].dwFlags); - todo_wine ok(raw_devices[2].hwndTarget == di_hwnd, "Unexpected raw device target: %p\n", raw_devices[1].hwndTarget); hr = IDirectInputDevice8_Unacquire(di_keyboard); ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %#lx\n", hr); @@ -1195,7 +1187,6 @@ static void test_mouse_keyboard(void) ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %#lx\n", hr); raw_devices_count = ARRAY_SIZE(raw_devices); GetRegisteredRawInputDevices(NULL, &raw_devices_count, sizeof(RAWINPUTDEVICE)); - todo_wine ok(raw_devices_count == 1, "Unexpected raw devices registered: %d\n", raw_devices_count);
IDirectInputDevice8_SetCooperativeLevel(di_mouse, hwnd, DISCL_FOREGROUND|DISCL_EXCLUSIVE); @@ -1210,7 +1201,6 @@ static void test_mouse_keyboard(void) hr = GetRegisteredRawInputDevices(raw_devices, &raw_devices_count, sizeof(RAWINPUTDEVICE)); ok(hr == 3, "GetRegisteredRawInputDevices returned %ld, raw_devices_count: %d\n", hr, raw_devices_count); ok(raw_devices[0].dwFlags == (RIDEV_CAPTUREMOUSE|RIDEV_NOLEGACY), "Unexpected raw device flags: %#lx\n", raw_devices[0].dwFlags); - todo_wine ok(raw_devices[2].dwFlags == (RIDEV_NOHOTKEYS|RIDEV_NOLEGACY), "Unexpected raw device flags: %#lx\n", raw_devices[1].dwFlags); hr = IDirectInputDevice8_Unacquire(di_keyboard); ok(SUCCEEDED(hr), "IDirectInputDevice8_Acquire failed: %#lx\n", hr); @@ -1219,7 +1209,6 @@ static void test_mouse_keyboard(void)
raw_devices_count = ARRAY_SIZE(raw_devices); hr = GetRegisteredRawInputDevices(raw_devices, &raw_devices_count, sizeof(RAWINPUTDEVICE)); - todo_wine ok(hr == 1, "GetRegisteredRawInputDevices returned %ld, raw_devices_count: %d\n", hr, raw_devices_count); ok(raw_devices[0].usUsagePage == HID_USAGE_PAGE_GENERIC, "got usUsagePage: %x\n", raw_devices[0].usUsagePage); ok(raw_devices[0].usUsage == HID_USAGE_GENERIC_GAMEPAD, "got usUsage: %x\n", raw_devices[0].usUsage);
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=129427
Your paranoid android.
=== debian11 (32 bit report) ===
d3d11: d3d11.c:25778: Test failed: Got 0, expected 33 (index 1). d3d11.c:25778: Test failed: Got 0, expected 66 (index 2). d3d11.c:25778: Test failed: Got 0, expected 99 (index 3). d3d11.c:25778: Test failed: Got 0, expected 132 (index 4). d3d11.c:25778: Test failed: Got 0, expected 165 (index 5). d3d11.c:25778: Test failed: Got 0, expected 198 (index 6). d3d11.c:25778: Test failed: Got 0, expected 231 (index 7). d3d11.c:25778: Test failed: Got 0, expected 264 (index 8). d3d11.c:25778: Test failed: Got 0, expected 297 (index 9). d3d11.c:25778: Test failed: Got 0, expected 330 (index 10). d3d11.c:25778: Test failed: Got 0, expected 363 (index 11). d3d11.c:25778: Test failed: Got 0, expected 396 (index 12). d3d11.c:25778: Test failed: Got 0, expected 429 (index 13). d3d11.c:25778: Test failed: Got 0, expected 462 (index 14). d3d11.c:25778: Test failed: Got 0, expected 495 (index 15). d3d11.c:25778: Test failed: Got 0, expected 528 (index 16). d3d11.c:25778: Test failed: Got 0, expected 561 (index 17). d3d11.c:25778: Test failed: Got 0, expected 594 (index 18). d3d11.c:25778: Test failed: Got 0, expected 627 (index 19). d3d11.c:25778: Test failed: Got 0, expected 660 (index 20). d3d11.c:25778: Test failed: Got 0, expected 693 (index 21). d3d11.c:25778: Test failed: Got 0, expected 726 (index 22). d3d11.c:25778: Test failed: Got 0, expected 759 (index 23). d3d11.c:25778: Test failed: Got 0, expected 792 (index 24). d3d11.c:25778: Test failed: Got 0, expected 825 (index 25). d3d11.c:25778: Test failed: Got 0, expected 858 (index 26). d3d11.c:25778: Test failed: Got 0, expected 891 (index 27). d3d11.c:25778: Test failed: Got 0, expected 924 (index 28). d3d11.c:25778: Test failed: Got 0, expected 957 (index 29). d3d11.c:25778: Test failed: Got 0, expected 990 (index 30). d3d11.c:25778: Test failed: Got 0, expected 1023 (index 31). d3d11.c:25778: Test failed: Got 0, expected 1056 (index 32). d3d11.c:25778: Test failed: Got 0, expected 1089 (index 33). d3d11.c:25778: Test failed: Got 0, expected 1122 (index 34). d3d11.c:25778: Test failed: Got 0, expected 1155 (index 35). d3d11.c:25778: Test failed: Got 0, expected 1188 (index 36). d3d11.c:25778: Test failed: Got 0, expected 1221 (index 37). d3d11.c:25778: Test failed: Got 0, expected 1254 (index 38). d3d11.c:25778: Test failed: Got 0, expected 1287 (index 39). d3d11.c:25778: Test failed: Got 0, expected 1320 (index 40). d3d11.c:25778: Test failed: Got 0, expected 1353 (index 41). d3d11.c:25778: Test failed: Got 0, expected 1386 (index 42). d3d11.c:25778: Test failed: Got 0, expected 1419 (index 43). d3d11.c:25778: Test failed: Got 0, expected 1452 (index 44). d3d11.c:25778: Test failed: Got 0, expected 1485 (index 45). d3d11.c:25778: Test failed: Got 0, expected 1518 (index 46). d3d11.c:25778: Test failed: Got 0, expected 1551 (index 47). d3d11.c:25778: Test failed: Got 0, expected 1584 (index 48). d3d11.c:25778: Test failed: Got 0, expected 1617 (index 49). d3d11.c:25778: Test failed: Got 0, expected 1650 (index 50). d3d11.c:25778: Test failed: Got 0, expected 1683 (index 51). d3d11.c:25778: Test failed: Got 0, expected 1716 (index 52). d3d11.c:25778: Test failed: Got 0, expected 1749 (index 53). d3d11.c:25778: Test failed: Got 0, expected 1782 (index 54). d3d11.c:25778: Test failed: Got 0, expected 1815 (index 55). d3d11.c:25778: Test failed: Got 0, expected 1848 (index 56). d3d11.c:25778: Test failed: Got 0, expected 1881 (index 57). d3d11.c:25778: Test failed: Got 0, expected 1914 (index 58). d3d11.c:25778: Test failed: Got 0, expected 1947 (index 59). d3d11.c:25778: Test failed: Got 0, expected 1980 (index 60). d3d11.c:25778: Test failed: Got 0, expected 2013 (index 61). d3d11.c:25778: Test failed: Got 0, expected 2046 (index 62). d3d11.c:25778: Test failed: Got 0, expected 2079 (index 63). d3d11.c:25810: Test failed: Got 0, expected 32 (index 0). d3d11.c:25810: Test failed: Got 0, expected 96 (index 1). d3d11.c:25810: Test failed: Got 0, expected 160 (index 2). d3d11.c:25810: Test failed: Got 0, expected 224 (index 3). d3d11.c:25810: Test failed: Got 0, expected 288 (index 4). d3d11.c:25810: Test failed: Got 0, expected 352 (index 5). d3d11.c:25810: Test failed: Got 0, expected 416 (index 6). d3d11.c:25810: Test failed: Got 0, expected 480 (index 7). d3d11.c:25810: Test failed: Got 0, expected 544 (index 8). d3d11.c:25810: Test failed: Got 0, expected 608 (index 9). d3d11.c:25810: Test failed: Got 0, expected 672 (index 10). d3d11.c:25810: Test failed: Got 0, expected 736 (index 11). d3d11.c:25810: Test failed: Got 0, expected 800 (index 12). d3d11.c:25810: Test failed: Got 0, expected 864 (index 13). d3d11.c:25810: Test failed: Got 0, expected 928 (index 14). d3d11.c:25810: Test failed: Got 0, expected 992 (index 15). d3d11.c:25810: Test failed: Got 0, expected 1056 (index 16). d3d11.c:25810: Test failed: Got 0, expected 1120 (index 17). d3d11.c:25810: Test failed: Got 0, expected 1184 (index 18). d3d11.c:25810: Test failed: Got 0, expected 1248 (index 19). d3d11.c:25810: Test failed: Got 0, expected 1312 (index 20). d3d11.c:25810: Test failed: Got 0, expected 1376 (index 21). d3d11.c:25810: Test failed: Got 0, expected 1440 (index 22). d3d11.c:25810: Test failed: Got 0, expected 1504 (index 23). d3d11.c:25810: Test failed: Got 0, expected 1568 (index 24). d3d11.c:25810: Test failed: Got 0, expected 1632 (index 25). d3d11.c:25810: Test failed: Got 0, expected 1696 (index 26). d3d11.c:25810: Test failed: Got 0, expected 1760 (index 27). d3d11.c:25810: Test failed: Got 0, expected 1824 (index 28). d3d11.c:25810: Test failed: Got 0, expected 1888 (index 29). d3d11.c:25810: Test failed: Got 0, expected 1952 (index 30). d3d11.c:25810: Test failed: Got 0, expected 2016 (index 31). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 1 (index 32). d3d11.c:25854: Test failed: Got 0, expected 1 (index 32). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 2 (index 33). d3d11.c:25854: Test failed: Got 0, expected 2 (index 33). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 3 (index 34). d3d11.c:25854: Test failed: Got 0, expected 3 (index 34). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 4 (index 35). d3d11.c:25854: Test failed: Got 0, expected 4 (index 35). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 5 (index 36). d3d11.c:25854: Test failed: Got 0, expected 5 (index 36). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 6 (index 37). d3d11.c:25854: Test failed: Got 0, expected 6 (index 37). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 7 (index 38). d3d11.c:25854: Test failed: Got 0, expected 7 (index 38). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 8 (index 39). d3d11.c:25854: Test failed: Got 0, expected 8 (index 39). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 9 (index 40). d3d11.c:25854: Test failed: Got 0, expected 9 (index 40). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 10 (index 41). d3d11.c:25854: Test failed: Got 0, expected 10 (index 41). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 11 (index 42). d3d11.c:25854: Test failed: Got 0, expected 11 (index 42). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 12 (index 43). d3d11.c:25854: Test failed: Got 0, expected 12 (index 43). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 13 (index 44). d3d11.c:25854: Test failed: Got 0, expected 13 (index 44). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 14 (index 45). d3d11.c:25854: Test failed: Got 0, expected 14 (index 45). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 15 (index 46). d3d11.c:25854: Test failed: Got 0, expected 15 (index 46). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 16 (index 47). d3d11.c:25854: Test failed: Got 0, expected 16 (index 47). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 17 (index 48). d3d11.c:25854: Test failed: Got 0, expected 17 (index 48). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 18 (index 49). d3d11.c:25854: Test failed: Got 0, expected 18 (index 49). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 19 (index 50). d3d11.c:25854: Test failed: Got 0, expected 19 (index 50). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 20 (index 51). d3d11.c:25854: Test failed: Got 0, expected 20 (index 51). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 21 (index 52). d3d11.c:25854: Test failed: Got 0, expected 21 (index 52). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 22 (index 53). d3d11.c:25854: Test failed: Got 0, expected 22 (index 53). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 23 (index 54). d3d11.c:25854: Test failed: Got 0, expected 23 (index 54). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 24 (index 55). d3d11.c:25854: Test failed: Got 0, expected 24 (index 55). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 25 (index 56). d3d11.c:25854: Test failed: Got 0, expected 25 (index 56). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 26 (index 57). d3d11.c:25854: Test failed: Got 0, expected 26 (index 57). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 27 (index 58). d3d11.c:25854: Test failed: Got 0, expected 27 (index 58). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 28 (index 59). d3d11.c:25854: Test failed: Got 0, expected 28 (index 59). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 29 (index 60). d3d11.c:25854: Test failed: Got 0, expected 29 (index 60). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 30 (index 61). d3d11.c:25854: Test failed: Got 0, expected 30 (index 61). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 31 (index 62). d3d11.c:25854: Test failed: Got 0, expected 31 (index 62). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 32 (index 63). d3d11.c:25854: Test failed: Got 0, expected 32 (index 63). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 2 (index 64). d3d11.c:25854: Test failed: Got 0, expected 2 (index 64). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 4 (index 65). d3d11.c:25854: Test failed: Got 0, expected 4 (index 65). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 6 (index 66). d3d11.c:25854: Test failed: Got 0, expected 6 (index 66). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 8 (index 67). d3d11.c:25854: Test failed: Got 0, expected 8 (index 67). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 10 (index 68). d3d11.c:25854: Test failed: Got 0, expected 10 (index 68). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 12 (index 69). d3d11.c:25854: Test failed: Got 0, expected 12 (index 69). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 14 (index 70). d3d11.c:25854: Test failed: Got 0, expected 14 (index 70). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 16 (index 71). d3d11.c:25854: Test failed: Got 0, expected 16 (index 71). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 18 (index 72). d3d11.c:25854: Test failed: Got 0, expected 18 (index 72). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 20 (index 73). d3d11.c:25854: Test failed: Got 0, expected 20 (index 73). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 22 (index 74). d3d11.c:25854: Test failed: Got 0, expected 22 (index 74). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 24 (index 75). d3d11.c:25854: Test failed: Got 0, expected 24 (index 75). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 26 (index 76). d3d11.c:25854: Test failed: Got 0, expected 26 (index 76). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 28 (index 77). d3d11.c:25854: Test failed: Got 0, expected 28 (index 77). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 30 (index 78). d3d11.c:25854: Test failed: Got 0, expected 30 (index 78). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 32 (index 79). d3d11.c:25854: Test failed: Got 0, expected 32 (index 79). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 34 (index 80). d3d11.c:25854: Test failed: Got 0, expected 34 (index 80). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 36 (index 81). d3d11.c:25854: Test failed: Got 0, expected 36 (index 81). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 38 (index 82). d3d11.c:25854: Test failed: Got 0, expected 38 (index 82). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 40 (index 83). d3d11.c:25854: Test failed: Got 0, expected 40 (index 83). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 42 (index 84). d3d11.c:25854: Test failed: Got 0, expected 42 (index 84). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 44 (index 85). d3d11.c:25854: Test failed: Got 0, expected 44 (index 85). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 46 (index 86). d3d11.c:25854: Test failed: Got 0, expected 46 (index 86). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 48 (index 87). d3d11.c:25854: Test failed: Got 0, expected 48 (index 87). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 50 (index 88). d3d11.c:25854: Test failed: Got 0, expected 50 (index 88). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 52 (index 89). d3d11.c:25854: Test failed: Got 0, expected 52 (index 89). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 54 (index 90). d3d11.c:25854: Test failed: Got 0, expected 54 (index 90). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 56 (index 91). d3d11.c:25854: Test failed: Got 0, expected 56 (index 91). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 58 (index 92). d3d11.c:25854: Test failed: Got 0, expected 58 (index 92). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 60 (index 93). d3d11.c:25854: Test failed: Got 0, expected 60 (index 93). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 62 (index 94). d3d11.c:25854: Test failed: Got 0, expected 62 (index 94). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 64 (index 95). d3d11.c:25854: Test failed: Got 0, expected 64 (index 95).