xinput1_3/tests: Test the GUIDs returned from XInputGetDSoundAudioDeviceGuids.
Signed-off-by: Bruno Jesus <00cpxxx@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b5646efe39
commit
ea4edbe179
|
@ -175,18 +175,31 @@ static void test_get_dsoundaudiodevice(void)
|
||||||
{
|
{
|
||||||
DWORD controllerNum;
|
DWORD controllerNum;
|
||||||
DWORD result;
|
DWORD result;
|
||||||
GUID soundRender;
|
GUID soundRender, soundCapture;
|
||||||
GUID 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}};
|
||||||
|
|
||||||
for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++)
|
for(controllerNum=0; controllerNum < XUSER_MAX_COUNT; controllerNum++)
|
||||||
{
|
{
|
||||||
|
soundRender = soundCapture = testGuid;
|
||||||
result = pXInputGetDSoundAudioDeviceGuids(controllerNum, &soundRender, &soundCapture);
|
result = pXInputGetDSoundAudioDeviceGuids(controllerNum, &soundRender, &soundCapture);
|
||||||
ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetDSoundAudioDeviceGuids failed with (%d)\n", result);
|
ok(result == ERROR_SUCCESS || result == ERROR_DEVICE_NOT_CONNECTED, "XInputGetDSoundAudioDeviceGuids failed with (%d)\n", result);
|
||||||
|
|
||||||
if (ERROR_DEVICE_NOT_CONNECTED == result)
|
if (ERROR_DEVICE_NOT_CONNECTED == result)
|
||||||
{
|
{
|
||||||
skip("Controller %d is not connected\n", controllerNum);
|
skip("Controller %d is not connected\n", controllerNum);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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");
|
||||||
}
|
}
|
||||||
|
|
||||||
result = pXInputGetDSoundAudioDeviceGuids(XUSER_MAX_COUNT+1, &soundRender, &soundCapture);
|
result = pXInputGetDSoundAudioDeviceGuids(XUSER_MAX_COUNT+1, &soundRender, &soundCapture);
|
||||||
|
|
Loading…
Reference in New Issue