dinput: Add object names for simulation HID usages.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2022-03-03 12:01:58 +01:00 committed by Alexandre Julliard
parent 3b45b4d52e
commit ab780cee83
2 changed files with 5 additions and 9 deletions

View File

@ -414,6 +414,11 @@ static const WCHAR *object_usage_to_string( DIDEVICEOBJECTINSTANCEW *instance )
case MAKELONG(PID_USAGE_TRIGGER_BUTTON, HID_USAGE_PAGE_PID): return L"Trigger Button";
case MAKELONG(HID_USAGE_SIMULATION_RUDDER, HID_USAGE_PAGE_SIMULATION): return L"Rudder";
case MAKELONG(HID_USAGE_SIMULATION_THROTTLE, HID_USAGE_PAGE_SIMULATION): return L"Throttle";
case MAKELONG(HID_USAGE_SIMULATION_ACCELERATOR, HID_USAGE_PAGE_SIMULATION): return L"Accelerator";
case MAKELONG(HID_USAGE_SIMULATION_BRAKE, HID_USAGE_PAGE_SIMULATION): return L"Brake";
case MAKELONG(HID_USAGE_SIMULATION_CLUTCH, HID_USAGE_PAGE_SIMULATION): return L"Clutch";
case MAKELONG(HID_USAGE_SIMULATION_STEERING, HID_USAGE_PAGE_SIMULATION): return L"Steering";
default: return NULL;
}
}

View File

@ -2773,20 +2773,11 @@ static void test_driving_wheel_axes(void)
.wUsage = HID_USAGE_GENERIC_JOYSTICK,
},
};
struct check_objects_todos object_todos[ARRAY_SIZE(expect_objects)] =
{
{.name = TRUE},
{.name = TRUE},
{.name = TRUE},
{.name = TRUE},
{.name = TRUE},
};
struct check_objects_params check_objects_params =
{
.version = DIRECTINPUT_VERSION,
.expect_count = ARRAY_SIZE(expect_objects),
.expect_objs = expect_objects,
.todo_objs = object_todos,
};
WCHAR cwd[MAX_PATH], tempdir[MAX_PATH];