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

oldstable
Lucas Fialho Zawacki 2011-07-08 15:00:55 -03:00 committed by Alexandre Julliard
parent 13421a210b
commit 662d332246
2 changed files with 6 additions and 2 deletions

View File

@ -865,6 +865,8 @@ static HRESULT WINAPI IDirectInput8AImpl_EnumDevicesBySemantics(
didevi.dwSize = sizeof(didevi);
if (dwFlags & DIEDBSFL_FORCEFEEDBACK) return DI_OK;
/* Enumerate keyboard and mouse */
for(i=0; i < sizeof(guids)/sizeof(guids[0]); i++)
{
@ -903,6 +905,8 @@ static HRESULT WINAPI IDirectInput8WImpl_EnumDevicesBySemantics(
didevi.dwSize = sizeof(didevi);
if (dwFlags & DIEDBSFL_FORCEFEEDBACK) return DI_OK;
/* Enumerate keyboard and mouse */
for(i=0; i < sizeof(guids)/sizeof(guids[0]); i++)
{

View File

@ -263,8 +263,8 @@ static void test_action_mapping(void)
count.mouse = NULL;
hr = IDirectInput8_EnumDevicesBySemantics(pDI, 0, &af, counting_callback, &count, DIEDBSFL_FORCEFEEDBACK);
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");
todo_wine ok (count.mouse == NULL, "Mouse should not be enumerated when asking for forcefeedback\n");
ok (count.keyboard == NULL, "Keyboard 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.
Before setting the action map for all devices we still have them available.