From 8f956d4f3ae5a20cebe4a1ddb9843034910bf919 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 9 Nov 2020 17:39:49 +0100 Subject: [PATCH] mmdevapi/tests: Only warn about the console when it is used. Signed-off-by: Francois Gouget Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- dlls/mmdevapi/tests/render.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 3ad00eaa2e2..8c82a1a81fd 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -2346,6 +2346,7 @@ static void test_endpointvolume(void) START_TEST(render) { HRESULT hr; + DWORD mode; CoInitializeEx(NULL, COINIT_MULTITHREADED); hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)&mme); @@ -2371,8 +2372,11 @@ START_TEST(render) test_formats(AUDCLNT_SHAREMODE_SHARED); test_references(); test_marshal(); - trace("Output to a MS-DOS console is particularly slow and disturbs timing.\n"); - trace("Please redirect output to a file.\n"); + if (GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode)) + { + trace("Output to a MS-DOS console is particularly slow and disturbs timing.\n"); + trace("Please redirect output to a file.\n"); + } test_event(); test_padding(); test_clock(1);