37 trace(
"-- Gamepad Variables --\n");
38 trace(
"Gamepad.wButtons: %#x\n",
data->wButtons);
39 trace(
"Gamepad.bLeftTrigger: %d\n",
data->bLeftTrigger);
40 trace(
"Gamepad.bRightTrigger: %d\n",
data->bRightTrigger);
41 trace(
"Gamepad.sThumbLX: %d\n",
data->sThumbLX);
42 trace(
"Gamepad.sThumbLY: %d\n",
data->sThumbLY);
43 trace(
"Gamepad.sThumbRX: %d\n",
data->sThumbRX);
44 trace(
"Gamepad.sThumbRY: %d\n\n",
data->sThumbRY);
53 for(controllerNum = 0; controllerNum <
XUSER_MAX_COUNT; controllerNum++)
59 result = pXInputSetState(controllerNum, &vibrator);
65 result = pXInputSetState(controllerNum, &vibrator);
71 if (pXInputEnable) pXInputEnable(0);
76 result = pXInputSetState(controllerNum, &vibrator);
79 if (pXInputEnable) pXInputEnable(1);
84 result = pXInputSetState(controllerNum, &vibrator);
97 for (
i = 0;
i < (pXInputGetStateEx ? 2 : 1);
i++)
99 for (controllerNum = 0; controllerNum <
XUSER_MAX_COUNT; controllerNum++)
108 "%s failed with (%d)\n",
i == 0 ?
"XInputGetState" :
"XInputGetStateEx",
result);
112 skip(
"Controller %d is not connected\n", controllerNum);
116 trace(
"-- Results for controller %d --\n", controllerNum);
119 good = controllerNum;
124 trace(
"State->dwPacketNumber: %d\n",
state.dwPacketNumber);
137 if (pXInputGetStateEx)
151 trace(
"You have 20 seconds to test the joystick freely\n");
155 pXInputGetState(good, &
state);
160 trace(
"Buttons 0x%04X Triggers %3d/%3d LT %6d/%6d RT %6d/%6d\n",
165 trace(
"Test over...\n");
175 for(controllerNum = 0; controllerNum <
XUSER_MAX_COUNT; controllerNum++)
181 "XInputGetKeystroke failed with (%d)\n",
result);
185 skip(
"Controller %d is not connected\n", controllerNum);
200 for(controllerNum = 0; controllerNum <
XUSER_MAX_COUNT; controllerNum++)
209 skip(
"Controller %d is not connected\n", controllerNum);
226 GUID soundRender, soundCapture;
227 GUID testGuid = {0xFFFFFFFF, 0xFFFF, 0xFFFF, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}};
228 GUID emptyGuid = {0x0, 0x0, 0x0, {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}};
230 for(controllerNum = 0; controllerNum <
XUSER_MAX_COUNT; controllerNum++)
232 soundRender = soundCapture = testGuid;
233 result = pXInputGetDSoundAudioDeviceGuids(controllerNum, &soundRender, &soundCapture);
238 skip(
"Controller %d is not connected\n", controllerNum);
243 ok(!
IsEqualGUID(&soundRender, &testGuid),
"Broken GUID returned for sound render device\n");
245 trace(
"Headset phone not attached\n");
248 ok(!
IsEqualGUID(&soundCapture, &testGuid),
"Broken GUID returned for sound capture device\n");
250 trace(
"Headset microphone not attached\n");
263 for(controllerNum = 0; controllerNum <
XUSER_MAX_COUNT; controllerNum++)
273 skip(
"Controller %d is not connected\n", controllerNum);
288 {
"xinput1_1.dll", 1 },
289 {
"xinput1_2.dll", 2 },
290 {
"xinput1_3.dll", 3 },
291 {
"xinput1_4.dll", 4 },
292 {
"xinput9_1_0.dll", 0 }
295 void *pXInputGetStateEx_Ordinal;
310 pXInputSetState = (
void*)
GetProcAddress(hXinput,
"XInputSetState");
311 pXInputGetState = (
void*)
GetProcAddress(hXinput,
"XInputGetState");
312 pXInputGetStateEx = (
void*)
GetProcAddress(hXinput,
"XInputGetStateEx");
314 pXInputGetKeystroke = (
void*)
GetProcAddress(hXinput,
"XInputGetKeystroke");
315 pXInputGetCapabilities = (
void*)
GetProcAddress(hXinput,
"XInputGetCapabilities");
316 pXInputGetDSoundAudioDeviceGuids = (
void*)
GetProcAddress(hXinput,
"XInputGetDSoundAudioDeviceGuids");
317 pXInputGetBatteryInformation = (
void*)
GetProcAddress(hXinput,
"XInputGetBatteryInformation");
320 if (!pXInputGetStateEx)
321 pXInputGetStateEx = pXInputGetStateEx_Ordinal;
330 ok(!pXInputGetDSoundAudioDeviceGuids,
"XInputGetDSoundAudioDeviceGuids exists in %s\n", libs[
i].
name);
336 ok(pXInputGetStateEx !=
NULL,
"XInputGetStateEx not found in %s\n", libs[
i].
name);
340 ok(!pXInputGetKeystroke,
"XInputGetKeystroke exists in %s\n", libs[
i].
name);
341 ok(!pXInputGetStateEx,
"XInputGetStateEx exists in %s\n", libs[
i].
name);
342 ok(!pXInputGetBatteryInformation,
"XInputGetBatteryInformation exists in %s\n", libs[
i].
name);
344 ok(!pXInputEnable,
"XInputEnable exists in %s\n", libs[
i].
name);
#define GetProcAddress(x, y)
static const WCHAR version[]
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetTickCount(VOID)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define IsEqualGUID(rguid1, rguid2)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
#define ERROR_DEVICE_NOT_CONNECTED
#define ERROR_BAD_ARGUMENTS