winebus.sys: Use public HID_USAGE_* constants.

Fix a typo in the process (HID_USAGE_DIGITIZER_Y_TILT is 0x3E, not 0x3F).

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-03-16 21:19:38 -05:00 committed by Alexandre Julliard
parent a909baeb4e
commit 602f20826d
2 changed files with 27 additions and 24 deletions

View File

@ -139,8 +139,8 @@ static const BYTE ABS_TO_HID_MAP[][2] = {
{HID_USAGE_PAGE_SIMULATION, HID_USAGE_SIMULATION_THROTTLE}, /*ABS_THROTTLE*/
{HID_USAGE_PAGE_SIMULATION, HID_USAGE_SIMULATION_RUDDER}, /*ABS_RUDDER*/
{HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_WHEEL}, /*ABS_WHEEL*/
{HID_USAGE_PAGE_SIMULATION, 0xC4}, /*ABS_GAS*/
{HID_USAGE_PAGE_SIMULATION, 0xC5}, /*ABS_BRAKE*/
{HID_USAGE_PAGE_SIMULATION, HID_USAGE_SIMULATION_ACCELLERATOR}, /*ABS_GAS*/
{HID_USAGE_PAGE_SIMULATION, HID_USAGE_SIMULATION_BRAKE}, /*ABS_BRAKE*/
{0,0}, /*ABS_HAT0X*/
{0,0}, /*ABS_HAT0Y*/
{0,0}, /*ABS_HAT1X*/
@ -149,15 +149,15 @@ static const BYTE ABS_TO_HID_MAP[][2] = {
{0,0}, /*ABS_HAT2Y*/
{0,0}, /*ABS_HAT3X*/
{0,0}, /*ABS_HAT3Y*/
{HID_USAGE_PAGE_DIGITIZER, 0x30}, /*ABS_PRESSURE*/
{HID_USAGE_PAGE_DIGITIZER, HID_USAGE_DIGITIZER_TIP_PRESSURE}, /*ABS_PRESSURE*/
{0, 0}, /*ABS_DISTANCE*/
{HID_USAGE_PAGE_DIGITIZER, 0x3D}, /*ABS_TILT_X*/
{HID_USAGE_PAGE_DIGITIZER, 0x3F}, /*ABS_TILT_Y*/
{HID_USAGE_PAGE_DIGITIZER, HID_USAGE_DIGITIZER_X_TILT}, /*ABS_TILT_X*/
{HID_USAGE_PAGE_DIGITIZER, HID_USAGE_DIGITIZER_Y_TILT}, /*ABS_TILT_Y*/
{0, 0}, /*ABS_TOOL_WIDTH*/
{0, 0},
{0, 0},
{0, 0},
{HID_USAGE_PAGE_CONSUMER, 0xE0} /*ABS_VOLUME*/
{HID_USAGE_PAGE_CONSUMER, HID_USAGE_CONSUMER_VOLUME} /*ABS_VOLUME*/
};
#define HID_ABS_MAX (ABS_VOLUME+1)
#define TOP_ABS_PAGE (HID_USAGE_PAGE_DIGITIZER+1)
@ -245,9 +245,9 @@ static const BYTE* what_am_I(struct udev_device *dev)
static const BYTE Keyboard[2] = {HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_KEYBOARD};
static const BYTE Gamepad[2] = {HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_GAMEPAD};
static const BYTE Keypad[2] = {HID_USAGE_PAGE_GENERIC, HID_USAGE_GENERIC_KEYPAD};
static const BYTE Tablet[2] = {HID_USAGE_PAGE_DIGITIZER, 0x2};
static const BYTE Touchscreen[2] = {HID_USAGE_PAGE_DIGITIZER, 0x4};
static const BYTE Touchpad[2] = {HID_USAGE_PAGE_DIGITIZER, 0x5};
static const BYTE Tablet[2] = {HID_USAGE_PAGE_DIGITIZER, HID_USAGE_DIGITIZER_PEN};
static const BYTE Touchscreen[2] = {HID_USAGE_PAGE_DIGITIZER, HID_USAGE_DIGITIZER_TOUCH_SCREEN};
static const BYTE Touchpad[2] = {HID_USAGE_PAGE_DIGITIZER, HID_USAGE_DIGITIZER_TOUCH_PAD};
struct udev_device *parent = dev;

View File

@ -24,6 +24,21 @@ extern "C" {
typedef USHORT USAGE, *PUSAGE;
#define HID_USAGE_CONSUMERCTRL ((USAGE) 0x01)
#define HID_USAGE_CONSUMER_VOLUME ((USAGE) 0xE0)
#define HID_USAGE_DIGITIZER_PEN ((USAGE) 0x02)
#define HID_USAGE_DIGITIZER_TOUCH_SCREEN ((USAGE) 0x04)
#define HID_USAGE_DIGITIZER_TOUCH_PAD ((USAGE) 0x05)
#define HID_USAGE_DIGITIZER_TIP_PRESSURE ((USAGE) 0x30)
#define HID_USAGE_DIGITIZER_IN_RANGE ((USAGE) 0x32)
#define HID_USAGE_DIGITIZER_X_TILT ((USAGE) 0x3D)
#define HID_USAGE_DIGITIZER_Y_TILT ((USAGE) 0x3E)
#define HID_USAGE_DIGITIZER_AZIMUTH ((USAGE) 0x3F)
#define HID_USAGE_DIGITIZER_TIP_SWITCH ((USAGE) 0x42)
#define HID_USAGE_DIGITIZER_BARREL_SWITCH ((USAGE) 0x44)
#define HID_USAGE_GENERIC_POINTER ((USAGE) 0x01)
#define HID_USAGE_GENERIC_MOUSE ((USAGE) 0x02)
#define HID_USAGE_GENERIC_JOYSTICK ((USAGE) 0x04)
@ -183,16 +198,11 @@ typedef USHORT USAGE, *PUSAGE;
#define HID_USAGE_PAGE_UNICODE ((USAGE) 0x10)
#define HID_USAGE_PAGE_ALPHANUMERIC ((USAGE) 0x14)
#define HID_USAGE_TELEPHONY_PHONE ((USAGE) 0x01)
#define HID_USAGE_TELEPHONY_ANSWERING_MACHINE ((USAGE) 0x02)
#define HID_USAGE_TELEPHONY_MESSAGE_CONTROLS ((USAGE) 0x03)
#define HID_USAGE_TELEPHONY_HANDSET ((USAGE) 0x04)
#define HID_USAGE_TELEPHONY_HEADSET ((USAGE) 0x05)
#define HID_USAGE_TELEPHONY_KEYPAD ((USAGE) 0x06)
#define HID_USAGE_TELEPHONY_PROGRAMMABLE_BUTTON ((USAGE) 0x07)
#define HID_USAGE_SIMULATION_RUDDER ((USAGE) 0xBA)
#define HID_USAGE_SIMULATION_THROTTLE ((USAGE) 0xBB)
#define HID_USAGE_SIMULATION_ACCELLERATOR ((USAGE) 0xC4)
#define HID_USAGE_SIMULATION_BRAKE ((USAGE) 0xC5)
#define HID_USAGE_SIMULATION_STEERING ((USAGE) 0xC8)
#define HID_USAGE_TELEPHONY_PHONE ((USAGE) 0x01)
#define HID_USAGE_TELEPHONY_ANSWERING_MACHINE ((USAGE) 0x02)
@ -214,13 +224,6 @@ typedef USHORT USAGE, *PUSAGE;
#define HID_USAGE_MS_BTH_HF_DIALNUMBER ((USAGE) 0x21)
#define HID_USAGE_MS_BTH_HF_DIALMEMORY ((USAGE) 0x22)
#define HID_USAGE_CONSUMERCTRL ((USAGE) 0x01)
#define HID_USAGE_DIGITIZER_PEN ((USAGE) 0x02)
#define HID_USAGE_DIGITIZER_IN_RANGE ((USAGE) 0x32)
#define HID_USAGE_DIGITIZER_TIP_SWITCH ((USAGE) 0x42)
#define HID_USAGE_DIGITIZER_BARREL_SWITCH ((USAGE) 0x44)
#ifdef __cplusplus
}
#endif