Commit 6aef301e authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput8/tests: Move HID driver tests from ntoskrnl.exe.

parent 810de9d1
TESTDLL = dinput8.dll
IMPORTS = dinput8 ole32 user32 advapi32
IMPORTS = dinput8 ole32 user32 hid advapi32 uuid crypt32 newdev setupapi wintrust
C_SRCS = \
driver_hid_IMPORTS = winecrt0 ntoskrnl hal hidclass
driver_hid_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
SOURCES = \
device.c \
dinput.c
dinput.c \
driver_hid.c \
driver_hid.spec \
hid.c
......@@ -19,8 +19,10 @@
#define DIRECTINPUT_VERSION 0x0800
#define COBJMACROS
#include <initguid.h>
#include <windows.h>
#include <objidl.h>
#include <initguid.h>
#include <dinput.h>
#include <dinputd.h>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* HID report helper macros.
*
* Copyright 2021 Rémi Bernon for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#undef Data
#undef Cnst
#undef Array
#undef Var
#undef Abs
#undef Rel
#undef NoWrap
#undef Wrap
#undef NonLin
#undef Lin
#undef NoPref
#undef Pref
#undef NoNull
#undef Null
#undef NonVol
#undef Vol
#undef Bits
#undef Buff
#undef Physical
#undef Application
#undef Logical
#undef Report
#undef NamedArray
#undef UsageSwitch
#undef UsageModifier
#undef SHORT_ITEM_0
#undef SHORT_ITEM_1
#undef SHORT_ITEM_2
#undef SHORT_ITEM_4
#undef LONG_ITEM
#undef INPUT
#undef OUTPUT
#undef FEATURE
#undef COLLECTION
#undef END_COLLECTION
#undef USAGE_PAGE
#undef LOGICAL_MINIMUM
#undef LOGICAL_MAXIMUM
#undef PHYSICAL_MINIMUM
#undef PHYSICAL_MAXIMUM
#undef UNIT_EXPONENT
#undef UNIT
#undef REPORT_SIZE
#undef REPORT_ID
#undef REPORT_COUNT
#undef PUSH
#undef POP
#undef USAGE
#undef USAGE_MINIMUM
#undef USAGE_MAXIMUM
#undef DESIGNATOR_INDEX
#undef DESIGNATOR_MINIMUM
#undef DESIGNATOR_MAXIMUM
#undef STRING_INDEX
#undef STRING_MINIMUM
#undef STRING_MAXIMUM
#undef DELIMITER
/*
* HID report helper macros.
*
* Copyright 2021 Rémi Bernon for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <hidusage.h>
#define Data 0
#define Cnst 0x01
#define Ary 0
#define Var 0x02
#define Abs 0
#define Rel 0x04
#define NoWrap 0
#define Wrap 0x08
#define NonLin 0
#define Lin 0x10
#define NoPref 0
#define Pref 0x20
#define NoNull 0
#define Null 0x40
#define NonVol 0
#define Vol 0x80
#define Bits 0
#define Buff 0x100
#define Physical 0x00
#define Application 0x01
#define Logical 0x02
#define Report 0x03
#define NamedArray 0x04
#define UsageSwitch 0x05
#define UsageModifier 0x06
#define SHORT_ITEM_0(tag,type) (((tag)<<4)|((type)<<2)|0)
#define SHORT_ITEM_1(tag,type,data) (((tag)<<4)|((type)<<2)|1),((data)&0xff)
#define SHORT_ITEM_2(tag,type,data) (((tag)<<4)|((type)<<2)|2),((data)&0xff),(((data)>>8)&0xff)
#define SHORT_ITEM_4(tag,type,data) (((tag)<<4)|((type)<<2)|3),((data)&0xff),(((data)>>8)&0xff),(((data)>>16)&0xff),(((data)>>24)&0xff)
#define LONG_ITEM(tag,size) SHORT_ITEM_2(0xf,0x3,((tag)<<8)|(size))
#define INPUT(n,data) SHORT_ITEM_##n(0x8,0,data)
#define OUTPUT(n,data) SHORT_ITEM_##n(0x9,0,data)
#define FEATURE(n,data) SHORT_ITEM_##n(0xb,0,data)
#define COLLECTION(n,data) SHORT_ITEM_##n(0xa,0,data)
#define END_COLLECTION SHORT_ITEM_0(0xc,0)
#define USAGE_PAGE(n,data) SHORT_ITEM_##n(0x0,1,data)
#define LOGICAL_MINIMUM(n,data) SHORT_ITEM_##n(0x1,1,data)
#define LOGICAL_MAXIMUM(n,data) SHORT_ITEM_##n(0x2,1,data)
#define PHYSICAL_MINIMUM(n,data) SHORT_ITEM_##n(0x3,1,data)
#define PHYSICAL_MAXIMUM(n,data) SHORT_ITEM_##n(0x4,1,data)
#define UNIT_EXPONENT(n,data) SHORT_ITEM_##n(0x5,1,data)
#define UNIT(n,data) SHORT_ITEM_##n(0x6,1,data)
#define REPORT_SIZE(n,data) SHORT_ITEM_##n(0x7,1,data)
#define REPORT_ID(n,data) SHORT_ITEM_##n(0x8,1,data)
#define REPORT_COUNT(n,data) SHORT_ITEM_##n(0x9,1,data)
#define PUSH(n,data) SHORT_ITEM_##n(0xa,1,data)
#define POP(n,data) SHORT_ITEM_##n(0xb,1,data)
#define USAGE(n,data) SHORT_ITEM_##n(0x0,2,data)
#define USAGE_MINIMUM(n,data) SHORT_ITEM_##n(0x1,2,data)
#define USAGE_MAXIMUM(n,data) SHORT_ITEM_##n(0x2,2,data)
#define DESIGNATOR_INDEX(n,data) SHORT_ITEM_##n(0x3,2,data)
#define DESIGNATOR_MINIMUM(n,data) SHORT_ITEM_##n(0x4,2,data)
#define DESIGNATOR_MAXIMUM(n,data) SHORT_ITEM_##n(0x5,2,data)
#define STRING_INDEX(n,data) SHORT_ITEM_##n(0x6,2,data)
#define STRING_MINIMUM(n,data) SHORT_ITEM_##n(0x7,2,data)
#define STRING_MAXIMUM(n,data) SHORT_ITEM_##n(0x8,2,data)
#define DELIMITER(n,data) SHORT_ITEM_##n(0x9,2,data)
......@@ -7,8 +7,6 @@ driver2_IMPORTS = winecrt0 ntoskrnl hal
driver2_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
driver3_IMPORTS = winecrt0 ntoskrnl hal
driver3_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
driver_hid_IMPORTS = winecrt0 ntoskrnl hal hidclass
driver_hid_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
driver_netio_IMPORTS = winecrt0 ntoskrnl hal netio
driver_netio_EXTRADLLFLAGS = -nodefaultlibs -nostartfiles -Wl,--subsystem,native
driver_pnp_IMPORTS = winecrt0 ntoskrnl hal
......@@ -21,8 +19,6 @@ SOURCES = \
driver2.spec \
driver3.c \
driver3.spec \
driver_hid.c \
driver_hid.spec \
driver_netio.c \
driver_netio.spec \
driver_pnp.c \
......
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