Commit 662d3322 authored by Lucas Fialho Zawacki's avatar Lucas Fialho Zawacki Committed by Alexandre Julliard

dinput: Prevent EnumDevicesBySematics from enumerating keyboard and mouse as having force feedback.

parent 13421a21
...@@ -865,6 +865,8 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics( ...@@ -865,6 +865,8 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics(
didevi.dwSize = sizeof(didevi); didevi.dwSize = sizeof(didevi);
if (dwFlags & DIEDBSFL_FORCEFEEDBACK) return DI_OK;
/* Enumerate keyboard and mouse */ /* Enumerate keyboard and mouse */
for(i=0; i < sizeof(guids)/sizeof(guids[0]); i++) for(i=0; i < sizeof(guids)/sizeof(guids[0]); i++)
{ {
...@@ -903,6 +905,8 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics( ...@@ -903,6 +905,8 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics(
didevi.dwSize = sizeof(didevi); didevi.dwSize = sizeof(didevi);
if (dwFlags & DIEDBSFL_FORCEFEEDBACK) return DI_OK;
/* Enumerate keyboard and mouse */ /* Enumerate keyboard and mouse */
for(i=0; i < sizeof(guids)/sizeof(guids[0]); i++) for(i=0; i < sizeof(guids)/sizeof(guids[0]); i++)
{ {
......
...@@ -263,8 +263,8 @@ static void test_action_mapping(void) ...@@ -263,8 +263,8 @@ static void test_action_mapping(void)
count.mouse = NULL; count.mouse = NULL;
hr = IDirectInput8_EnumDevicesBySemantics(pDI, 0, &af, counting_callback, &count, DIEDBSFL_FORCEFEEDBACK); hr = IDirectInput8_EnumDevicesBySemantics(pDI, 0, &af, counting_callback, &count, DIEDBSFL_FORCEFEEDBACK);
ok (SUCCEEDED(hr), "EnumDevicesBySemantics failed hr=%08x\n", hr); ok (SUCCEEDED(hr), "EnumDevicesBySemantics failed hr=%08x\n", hr);
todo_wine ok (count.keyboard == NULL, "Keyboard should not be enumerated when asking for forcefeedback\n"); ok (count.keyboard == NULL, "Keyboard should not be enumerated when asking for forcefeedback\n");
todo_wine ok (count.mouse == NULL, "Mouse should not be enumerated when asking for forcefeedback\n"); ok (count.mouse == NULL, "Mouse should not be enumerated when asking for forcefeedback\n");
/* Enumerate available devices. That is devices with not owned by any user. /* Enumerate available devices. That is devices with not owned by any user.
Before setting the action map for all devices we still have them available. Before setting the action map for all devices we still have them available.
......
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