winmm/tests: Skip tests if MIDI cannot be opened.
This commit is contained in:
parent
5db7d5957a
commit
c2224ea8bb
|
@ -227,6 +227,11 @@ static void test_midiOut_device(UINT udev, HWND hwnd)
|
||||||
rc = midiOutOpen(&hm, udev, (DWORD_PTR)hwnd, (DWORD_PTR)MYCBINST, CALLBACK_WINDOW);
|
rc = midiOutOpen(&hm, udev, (DWORD_PTR)hwnd, (DWORD_PTR)MYCBINST, CALLBACK_WINDOW);
|
||||||
else
|
else
|
||||||
rc = midiOutOpen(&hm, udev, (DWORD_PTR)callback_func, (DWORD_PTR)MYCBINST, CALLBACK_FUNCTION);
|
rc = midiOutOpen(&hm, udev, (DWORD_PTR)callback_func, (DWORD_PTR)MYCBINST, CALLBACK_FUNCTION);
|
||||||
|
if (rc == MMSYSERR_NOTSUPPORTED)
|
||||||
|
{
|
||||||
|
skip( "MIDI out not supported\n" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
ok(!rc, "midiOutOpen(dev=%d) rc=%s\n", udev, mmsys_error(rc));
|
ok(!rc, "midiOutOpen(dev=%d) rc=%s\n", udev, mmsys_error(rc));
|
||||||
if (rc) return;
|
if (rc) return;
|
||||||
|
|
||||||
|
@ -382,6 +387,11 @@ static void test_midiStream(UINT udev, HWND hwnd)
|
||||||
rc = midiStreamOpen(&hm, &udev, 1, (DWORD_PTR)hwnd, (DWORD_PTR)MYCBINST, CALLBACK_WINDOW);
|
rc = midiStreamOpen(&hm, &udev, 1, (DWORD_PTR)hwnd, (DWORD_PTR)MYCBINST, CALLBACK_WINDOW);
|
||||||
else
|
else
|
||||||
rc = midiStreamOpen(&hm, &udev, 1, (DWORD_PTR)callback_func, (DWORD_PTR)MYCBINST, CALLBACK_FUNCTION);
|
rc = midiStreamOpen(&hm, &udev, 1, (DWORD_PTR)callback_func, (DWORD_PTR)MYCBINST, CALLBACK_FUNCTION);
|
||||||
|
if (rc == MMSYSERR_NOTSUPPORTED)
|
||||||
|
{
|
||||||
|
skip( "MIDI stream not supported\n" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
ok(!rc, "midiStreamOpen(dev=%d) rc=%s\n", udev, mmsys_error(rc));
|
ok(!rc, "midiStreamOpen(dev=%d) rc=%s\n", udev, mmsys_error(rc));
|
||||||
if (rc) return;
|
if (rc) return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue