Francois Gouget : mmdevapi/tests: Only warn about the console when it is used.

Alexandre Julliard julliard at winehq.org
Thu Nov 12 15:17:46 CST 2020


Module: wine
Branch: master
Commit: 8f956d4f3ae5a20cebe4a1ddb9843034910bf919
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=8f956d4f3ae5a20cebe4a1ddb9843034910bf919

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon Nov  9 17:39:49 2020 +0100

mmdevapi/tests: Only warn about the console when it is used.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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);




More information about the wine-cvs mailing list