2008-11-10 17:32:33 +01:00
|
|
|
/*
|
|
|
|
* The Wine project - Xinput Joystick Library
|
|
|
|
* Copyright 2008 Andrew Fenn
|
|
|
|
*
|
|
|
|
* 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 <windows.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "xinput.h"
|
|
|
|
#include "wine/test.h"
|
|
|
|
|
|
|
|
static DWORD (WINAPI *pXInputGetState)(DWORD, XINPUT_STATE*);
|
2018-01-22 17:03:18 +01:00
|
|
|
static DWORD (WINAPI *pXInputGetStateEx)(DWORD, XINPUT_STATE*);
|
2008-11-10 17:33:15 +01:00
|
|
|
static DWORD (WINAPI *pXInputGetCapabilities)(DWORD,DWORD,XINPUT_CAPABILITIES*);
|
2009-01-01 02:06:34 +01:00
|
|
|
static DWORD (WINAPI *pXInputSetState)(DWORD, XINPUT_VIBRATION*);
|
|
|
|
static void (WINAPI *pXInputEnable)(BOOL);
|
2009-01-06 14:48:19 +01:00
|
|
|
static DWORD (WINAPI *pXInputGetKeystroke)(DWORD, DWORD, PXINPUT_KEYSTROKE);
|
2009-01-07 19:46:30 +01:00
|
|
|
static DWORD (WINAPI *pXInputGetDSoundAudioDeviceGuids)(DWORD, GUID*, GUID*);
|
2009-01-07 19:48:25 +01:00
|
|
|
static DWORD (WINAPI *pXInputGetBatteryInformation)(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*);
|
2009-01-01 02:06:34 +01:00
|
|
|
|
2016-12-06 15:52:33 +01:00
|
|
|
static void dump_gamepad(XINPUT_GAMEPAD *data)
|
|
|
|
{
|
|
|
|
trace("-- Gamepad Variables --\n");
|
|
|
|
trace("Gamepad.wButtons: %#x\n", data->wButtons);
|
|
|
|
trace("Gamepad.bLeftTrigger: %d\n", data->bLeftTrigger);
|
|
|
|
trace("Gamepad.bRightTrigger: %d\n", data->bRightTrigger);
|
|
|
|
trace("Gamepad.sThumbLX: %d\n", data->sThumbLX);
|
|
|
|
trace("Gamepad.sThumbLY: %d\n", data->sThumbLY);
|
|
|
|
trace("Gamepad.sThumbRX: %d\n", data->sThumbRX);
|
|
|
|
trace("Gamepad.sThumbRY: %d\n\n", data->sThumbRY);
|
|
|
|
}
|
|
|
|
|
2009-01-01 02:06:34 +01:00
|
|
|
static void test_set_state(void)
|
|
|
|
{
|
|
|
|
XINPUT_VIBRATION vibrator;
|
|
|
|
DWORD controllerNum;
|
|
|
|
DWORD result;
|
|
|
|
|
2016-12-06 15:52:34 +01:00
|
|
|
for(controllerNum = 0; controllerNum < XUSER_MAX_COUNT; controllerNum++)
|
2009-01-01 02:06:34 +01:00
|
|
|
{
|
|
|
|
ZeroMemory(&vibrator, sizeof(XINPUT_VIBRATION));
|
|
|
|
|
2016-12-09 08:26:08 +01:00
|
|
|
vibrator.wLeftMotorSpeed = 32767;
|
|
|
|
vibrator.wRightMotorSpeed = 32767;
|
|
|
|
result = pXInputSetState(controllerNum, &vibrator);
|
|
|
|
if (result == ERROR_DEVICE_NOT_CONNECTED) continue;
|
|
|
|
|
|
|
|
Sleep(250);
|
2009-01-01 02:06:34 +01:00
|
|
|
vibrator.wLeftMotorSpeed = 0;
|
|
|
|
vibrator.wRightMotorSpeed = 0;
|
|
|
|
result = pXInputSetState(controllerNum, &vibrator);
|
2016-12-09 08:26:08 +01:00
|
|
|
ok(result == ERROR_SUCCESS, "XInputSetState failed with (%d)\n", result);
|
2009-01-01 02:06:34 +01:00
|
|
|
|
2016-12-06 15:52:34 +01:00
|
|
|
/* Disabling XInput here, queueing a vibration and then re-enabling XInput
|
|
|
|
* is used to prove that vibrations are auto enabled when resuming XInput.
|
2016-12-09 08:26:08 +01:00
|
|
|
* If XInputEnable(1) is removed below the vibration will never play. */
|
2016-09-10 23:46:26 +02:00
|
|
|
if (pXInputEnable) pXInputEnable(0);
|
2009-01-01 02:06:34 +01:00
|
|
|
|
2016-12-09 08:26:08 +01:00
|
|
|
Sleep(250);
|
2009-01-01 02:06:34 +01:00
|
|
|
vibrator.wLeftMotorSpeed = 65535;
|
|
|
|
vibrator.wRightMotorSpeed = 65535;
|
|
|
|
result = pXInputSetState(controllerNum, &vibrator);
|
2016-12-09 08:26:08 +01:00
|
|
|
ok(result == ERROR_SUCCESS, "XInputSetState failed with (%d)\n", result);
|
2009-01-01 02:06:34 +01:00
|
|
|
|
2016-09-10 23:46:26 +02:00
|
|
|
if (pXInputEnable) pXInputEnable(1);
|
2016-12-09 08:26:08 +01:00
|
|
|
Sleep(250);
|
|
|
|
|
|
|
|
vibrator.wLeftMotorSpeed = 0;
|
|
|
|
vibrator.wRightMotorSpeed = 0;
|
|
|
|
result = pXInputSetState(controllerNum, &vibrator);
|
|
|
|
ok(result == ERROR_SUCCESS, "XInputSetState failed with (%d)\n", result);
|
2009-01-01 02:06:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
result = pXInputSetState(XUSER_MAX_COUNT+1, &vibrator);
|
|
|
|
ok(result == ERROR_BAD_ARGUMENTS, "XInputSetState returned (%d)\n", result);
|
|
|
|
}
|
2008-11-10 17:32:33 +01:00
|
|
|
|
|
|
|
static void test_get_state(void)
|
|
|
|
{
|
2018-01-22 17:03:18 +01:00
|
|
|
XINPUT_STATE state;
|
2016-12-14 02:21:59 +01:00
|
|
|
DWORD controllerNum, i, result, good = XUSER_MAX_COUNT;
|
2008-11-10 17:32:33 +01:00
|
|
|
|
2016-08-31 20:17:44 +02:00
|
|
|
for (i = 0; i < (pXInputGetStateEx ? 2 : 1); i++)
|
2008-11-10 17:32:33 +01:00
|
|
|
{
|
2016-08-31 20:17:44 +02:00
|
|
|
for (controllerNum = 0; controllerNum < XUSER_MAX_COUNT; controllerNum++)
|
|
|
|
{
|
2018-01-22 17:03:18 +01:00
|
|
|
ZeroMemory(&state, sizeof(state));
|
2008-11-10 17:32:33 +01:00
|
|
|
|
2016-08-31 20:17:44 +02:00
|
|
|
if (i == 0)
|
2018-01-22 17:03:18 +01:00
|
|
|
result = pXInputGetState(controllerNum, &state);
|
2016-08-31 20:17:44 +02:00
|
|
|
else
|
2018-01-22 17:03:18 +01:00
|
|
|
result = pXInputGetStateEx(controllerNum, &state);
|
2016-08-31 20:17:44 +02:00
|
|
|
ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED,
|
|
|
|
"%s failed with (%d)\n", i == 0 ? "XInputGetState" : "XInputGetStateEx", result);
|
|
|
|
|
|
|
|
if (ERROR_DEVICE_NOT_CONNECTED == result)
|
|
|
|
{
|
|
|
|
skip("Controller %d is not connected\n", controllerNum);
|
|
|
|
continue;
|
|
|
|
}
|
2008-11-10 17:32:33 +01:00
|
|
|
|
|
|
|
trace("-- Results for controller %d --\n", controllerNum);
|
2016-08-31 20:17:44 +02:00
|
|
|
if (i == 0)
|
2016-12-14 02:21:59 +01:00
|
|
|
{
|
|
|
|
good = controllerNum;
|
2016-08-31 20:17:44 +02:00
|
|
|
trace("XInputGetState: %d\n", result);
|
2016-12-14 02:21:59 +01:00
|
|
|
}
|
2016-08-31 20:17:44 +02:00
|
|
|
else
|
|
|
|
trace("XInputGetStateEx: %d\n", result);
|
2018-01-22 17:03:18 +01:00
|
|
|
trace("State->dwPacketNumber: %d\n", state.dwPacketNumber);
|
|
|
|
dump_gamepad(&state.Gamepad);
|
2008-11-10 17:32:33 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-22 17:03:18 +01:00
|
|
|
result = pXInputGetState(XUSER_MAX_COUNT, &state);
|
2016-08-31 20:17:44 +02:00
|
|
|
ok(result == ERROR_BAD_ARGUMENTS, "XInputGetState returned (%d)\n", result);
|
|
|
|
|
2018-01-22 17:03:18 +01:00
|
|
|
result = pXInputGetState(XUSER_MAX_COUNT+1, &state);
|
2008-11-10 17:32:33 +01:00
|
|
|
ok(result == ERROR_BAD_ARGUMENTS, "XInputGetState returned (%d)\n", result);
|
2016-08-31 20:17:44 +02:00
|
|
|
if (pXInputGetStateEx)
|
|
|
|
{
|
2018-01-22 17:03:18 +01:00
|
|
|
result = pXInputGetStateEx(XUSER_MAX_COUNT, &state);
|
2016-08-31 20:17:44 +02:00
|
|
|
ok(result == ERROR_BAD_ARGUMENTS, "XInputGetState returned (%d)\n", result);
|
|
|
|
|
2018-01-22 17:03:18 +01:00
|
|
|
result = pXInputGetStateEx(XUSER_MAX_COUNT+1, &state);
|
2016-08-31 20:17:44 +02:00
|
|
|
ok(result == ERROR_BAD_ARGUMENTS, "XInputGetState returned (%d)\n", result);
|
|
|
|
}
|
2016-12-14 02:21:59 +01:00
|
|
|
|
|
|
|
if (winetest_interactive && good < XUSER_MAX_COUNT)
|
|
|
|
{
|
|
|
|
DWORD now = GetTickCount(), packet = 0;
|
2018-01-22 17:03:18 +01:00
|
|
|
XINPUT_GAMEPAD *game = &state.Gamepad;
|
2016-12-14 02:21:59 +01:00
|
|
|
|
|
|
|
trace("You have 20 seconds to test the joystick freely\n");
|
|
|
|
do
|
|
|
|
{
|
|
|
|
Sleep(100);
|
2018-01-22 17:03:18 +01:00
|
|
|
pXInputGetState(good, &state);
|
|
|
|
if (state.dwPacketNumber == packet)
|
2016-12-14 02:21:59 +01:00
|
|
|
continue;
|
|
|
|
|
2018-01-22 17:03:18 +01:00
|
|
|
packet = state.dwPacketNumber;
|
2016-12-14 02:21:59 +01:00
|
|
|
trace("Buttons 0x%04X Triggers %3d/%3d LT %6d/%6d RT %6d/%6d\n",
|
|
|
|
game->wButtons, game->bLeftTrigger, game->bRightTrigger,
|
|
|
|
game->sThumbLX, game->sThumbLY, game->sThumbRX, game->sThumbRY);
|
|
|
|
}
|
|
|
|
while(GetTickCount() - now < 20000);
|
|
|
|
trace("Test over...\n");
|
|
|
|
}
|
2008-11-10 17:32:33 +01:00
|
|
|
}
|
|
|
|
|
2009-01-06 14:48:19 +01:00
|
|
|
static void test_get_keystroke(void)
|
|
|
|
{
|
|
|
|
XINPUT_KEYSTROKE keystroke;
|
|
|
|
DWORD controllerNum;
|
|
|
|
DWORD result;
|
|
|
|
|
2016-12-06 15:52:34 +01:00
|
|
|
for(controllerNum = 0; controllerNum < XUSER_MAX_COUNT; controllerNum++)
|
2009-01-06 14:48:19 +01:00
|
|
|
{
|
|
|
|
ZeroMemory(&keystroke, sizeof(XINPUT_KEYSTROKE));
|
|
|
|
|
|
|
|
result = pXInputGetKeystroke(controllerNum, XINPUT_FLAG_GAMEPAD, &keystroke);
|
2016-09-10 23:46:27 +02:00
|
|
|
ok(result == ERROR_EMPTY || result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED,
|
|
|
|
"XInputGetKeystroke failed with (%d)\n", result);
|
2009-01-06 14:48:19 +01:00
|
|
|
|
|
|
|
if (ERROR_DEVICE_NOT_CONNECTED == result)
|
|
|
|
{
|
|
|
|
skip("Controller %d is not connected\n", controllerNum);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ZeroMemory(&keystroke, sizeof(XINPUT_KEYSTROKE));
|
|
|
|
result = pXInputGetKeystroke(XUSER_MAX_COUNT+1, XINPUT_FLAG_GAMEPAD, &keystroke);
|
|
|
|
ok(result == ERROR_BAD_ARGUMENTS, "XInputGetKeystroke returned (%d)\n", result);
|
|
|
|
}
|
|
|
|
|
2008-11-10 17:33:15 +01:00
|
|
|
static void test_get_capabilities(void)
|
|
|
|
{
|
|
|
|
XINPUT_CAPABILITIES capabilities;
|
|
|
|
DWORD controllerNum;
|
|
|
|
DWORD result;
|
|
|
|
|
2016-12-06 15:52:34 +01:00
|
|
|
for(controllerNum = 0; controllerNum < XUSER_MAX_COUNT; controllerNum++)
|
2008-11-10 17:33:15 +01:00
|
|
|
{
|
|
|
|
ZeroMemory(&capabilities, sizeof(XINPUT_CAPABILITIES));
|
|
|
|
|
|
|
|
result = pXInputGetCapabilities(controllerNum, XINPUT_FLAG_GAMEPAD, &capabilities);
|
|
|
|
ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetCapabilities failed with (%d)\n", result);
|
|
|
|
|
|
|
|
if (ERROR_DEVICE_NOT_CONNECTED == result)
|
|
|
|
{
|
|
|
|
skip("Controller %d is not connected\n", controllerNum);
|
2016-12-06 15:52:33 +01:00
|
|
|
continue;
|
2008-11-10 17:33:15 +01:00
|
|
|
}
|
2016-12-06 15:52:33 +01:00
|
|
|
|
|
|
|
/* Important to show that the results changed between 1.3 and 1.4 XInput version */
|
|
|
|
dump_gamepad(&capabilities.Gamepad);
|
2008-11-10 17:33:15 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
ZeroMemory(&capabilities, sizeof(XINPUT_CAPABILITIES));
|
|
|
|
result = pXInputGetCapabilities(XUSER_MAX_COUNT+1, XINPUT_FLAG_GAMEPAD, &capabilities);
|
|
|
|
ok(result == ERROR_BAD_ARGUMENTS, "XInputGetCapabilities returned (%d)\n", result);
|
|
|
|
}
|
|
|
|
|
2009-01-07 19:46:30 +01:00
|
|
|
static void test_get_dsoundaudiodevice(void)
|
|
|
|
{
|
|
|
|
DWORD controllerNum;
|
|
|
|
DWORD result;
|
2016-12-06 15:52:32 +01:00
|
|
|
GUID soundRender, soundCapture;
|
|
|
|
GUID testGuid = {0xFFFFFFFF, 0xFFFF, 0xFFFF, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}};
|
|
|
|
GUID emptyGuid = {0x0, 0x0, 0x0, {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}};
|
2009-01-07 19:46:30 +01:00
|
|
|
|
2016-12-06 15:52:34 +01:00
|
|
|
for(controllerNum = 0; controllerNum < XUSER_MAX_COUNT; controllerNum++)
|
2009-01-07 19:46:30 +01:00
|
|
|
{
|
2016-12-06 15:52:32 +01:00
|
|
|
soundRender = soundCapture = testGuid;
|
2009-01-07 19:46:30 +01:00
|
|
|
result = pXInputGetDSoundAudioDeviceGuids(controllerNum, &soundRender, &soundCapture);
|
|
|
|
ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetDSoundAudioDeviceGuids failed with (%d)\n", result);
|
|
|
|
|
|
|
|
if (ERROR_DEVICE_NOT_CONNECTED == result)
|
|
|
|
{
|
|
|
|
skip("Controller %d is not connected\n", controllerNum);
|
2016-12-06 15:52:32 +01:00
|
|
|
continue;
|
2009-01-07 19:46:30 +01:00
|
|
|
}
|
2016-12-06 15:52:32 +01:00
|
|
|
|
|
|
|
if (!IsEqualGUID(&soundRender, &emptyGuid))
|
|
|
|
ok(!IsEqualGUID(&soundRender, &testGuid), "Broken GUID returned for sound render device\n");
|
|
|
|
else
|
|
|
|
trace("Headset phone not attached\n");
|
|
|
|
|
|
|
|
if (!IsEqualGUID(&soundCapture, &emptyGuid))
|
|
|
|
ok(!IsEqualGUID(&soundCapture, &testGuid), "Broken GUID returned for sound capture device\n");
|
|
|
|
else
|
|
|
|
trace("Headset microphone not attached\n");
|
2009-01-07 19:46:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
result = pXInputGetDSoundAudioDeviceGuids(XUSER_MAX_COUNT+1, &soundRender, &soundCapture);
|
|
|
|
ok(result == ERROR_BAD_ARGUMENTS, "XInputGetDSoundAudioDeviceGuids returned (%d)\n", result);
|
|
|
|
}
|
|
|
|
|
2009-01-07 19:48:25 +01:00
|
|
|
static void test_get_batteryinformation(void)
|
|
|
|
{
|
|
|
|
DWORD controllerNum;
|
|
|
|
DWORD result;
|
|
|
|
XINPUT_BATTERY_INFORMATION batteryInfo;
|
|
|
|
|
2016-12-06 15:52:34 +01:00
|
|
|
for(controllerNum = 0; controllerNum < XUSER_MAX_COUNT; controllerNum++)
|
2009-01-07 19:48:25 +01:00
|
|
|
{
|
|
|
|
ZeroMemory(&batteryInfo, sizeof(XINPUT_BATTERY_INFORMATION));
|
|
|
|
|
|
|
|
result = pXInputGetBatteryInformation(controllerNum, BATTERY_DEVTYPE_GAMEPAD, &batteryInfo);
|
|
|
|
ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetBatteryInformation failed with (%d)\n", result);
|
|
|
|
|
|
|
|
if (ERROR_DEVICE_NOT_CONNECTED == result)
|
|
|
|
{
|
2009-01-08 19:23:16 +01:00
|
|
|
ok(batteryInfo.BatteryLevel == BATTERY_TYPE_DISCONNECTED, "Failed to report device as being disconnected.\n");
|
2009-01-07 19:48:25 +01:00
|
|
|
skip("Controller %d is not connected\n", controllerNum);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
result = pXInputGetBatteryInformation(XUSER_MAX_COUNT+1, BATTERY_DEVTYPE_GAMEPAD, &batteryInfo);
|
|
|
|
ok(result == ERROR_BAD_ARGUMENTS, "XInputGetBatteryInformation returned (%d)\n", result);
|
|
|
|
}
|
|
|
|
|
2008-11-10 17:32:33 +01:00
|
|
|
START_TEST(xinput)
|
|
|
|
{
|
2016-09-10 23:46:26 +02:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
const char *name;
|
|
|
|
int version;
|
|
|
|
} libs[] = {
|
|
|
|
{ "xinput1_1.dll", 1 },
|
|
|
|
{ "xinput1_2.dll", 2 },
|
|
|
|
{ "xinput1_3.dll", 3 },
|
|
|
|
{ "xinput1_4.dll", 4 },
|
|
|
|
{ "xinput9_1_0.dll", 0 } /* legacy for XP/Vista */
|
|
|
|
};
|
2008-11-10 17:32:33 +01:00
|
|
|
HMODULE hXinput;
|
2016-08-31 20:17:44 +02:00
|
|
|
void *pXInputGetStateEx_Ordinal;
|
2016-09-10 23:46:26 +02:00
|
|
|
int i;
|
2008-11-10 17:32:33 +01:00
|
|
|
|
2016-09-10 23:46:26 +02:00
|
|
|
for (i = 0; i < sizeof(libs) / sizeof(libs[0]); i++)
|
2008-11-10 17:32:33 +01:00
|
|
|
{
|
2016-09-10 23:46:26 +02:00
|
|
|
hXinput = LoadLibraryA( libs[i].name );
|
|
|
|
|
|
|
|
if (!hXinput)
|
|
|
|
{
|
|
|
|
win_skip("Could not load %s\n", libs[i].name);
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
trace("Testing %s\n", libs[i].name);
|
|
|
|
|
|
|
|
pXInputEnable = (void*)GetProcAddress(hXinput, "XInputEnable");
|
|
|
|
pXInputSetState = (void*)GetProcAddress(hXinput, "XInputSetState");
|
|
|
|
pXInputGetState = (void*)GetProcAddress(hXinput, "XInputGetState");
|
|
|
|
pXInputGetStateEx = (void*)GetProcAddress(hXinput, "XInputGetStateEx"); /* Win >= 8 */
|
|
|
|
pXInputGetStateEx_Ordinal = (void*)GetProcAddress(hXinput, (LPCSTR) 100);
|
|
|
|
pXInputGetKeystroke = (void*)GetProcAddress(hXinput, "XInputGetKeystroke");
|
|
|
|
pXInputGetCapabilities = (void*)GetProcAddress(hXinput, "XInputGetCapabilities");
|
|
|
|
pXInputGetDSoundAudioDeviceGuids = (void*)GetProcAddress(hXinput, "XInputGetDSoundAudioDeviceGuids");
|
|
|
|
pXInputGetBatteryInformation = (void*)GetProcAddress(hXinput, "XInputGetBatteryInformation");
|
|
|
|
|
|
|
|
/* XInputGetStateEx may not be present by name, use ordinal in this case */
|
|
|
|
if (!pXInputGetStateEx)
|
|
|
|
pXInputGetStateEx = pXInputGetStateEx_Ordinal;
|
|
|
|
|
|
|
|
test_set_state();
|
|
|
|
test_get_state();
|
|
|
|
test_get_capabilities();
|
|
|
|
|
|
|
|
if (libs[i].version != 4)
|
|
|
|
test_get_dsoundaudiodevice();
|
|
|
|
else
|
|
|
|
ok(!pXInputGetDSoundAudioDeviceGuids, "XInputGetDSoundAudioDeviceGuids exists in %s\n", libs[i].name);
|
|
|
|
|
|
|
|
if (libs[i].version > 2)
|
|
|
|
{
|
|
|
|
test_get_keystroke();
|
|
|
|
test_get_batteryinformation();
|
|
|
|
ok(pXInputGetStateEx != NULL, "XInputGetStateEx not found in %s\n", libs[i].name);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ok(!pXInputGetKeystroke, "XInputGetKeystroke exists in %s\n", libs[i].name);
|
|
|
|
ok(!pXInputGetStateEx, "XInputGetStateEx exists in %s\n", libs[i].name);
|
|
|
|
ok(!pXInputGetBatteryInformation, "XInputGetBatteryInformation exists in %s\n", libs[i].name);
|
|
|
|
if (libs[i].version == 0)
|
|
|
|
ok(!pXInputEnable, "XInputEnable exists in %s\n", libs[i].name);
|
|
|
|
}
|
2008-12-15 14:50:06 +01:00
|
|
|
|
2016-09-10 23:46:26 +02:00
|
|
|
FreeLibrary(hXinput);
|
|
|
|
}
|
2008-11-10 17:32:33 +01:00
|
|
|
}
|