Francois Gouget : ddraw/tests: Skip the primary palette tests if the 640x480x8 mode is not supported.

Alexandre Julliard julliard at winehq.org
Wed Feb 12 13:44:39 CST 2014


Module: wine
Branch: master
Commit: 5e7724808c57a38c56b8bcb2c156035de3db0d68
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5e7724808c57a38c56b8bcb2c156035de3db0d68

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Feb 12 10:28:59 2014 +0100

ddraw/tests: Skip the primary palette tests if the 640x480x8 mode is not supported.

---

 dlls/ddraw/tests/ddraw1.c |    6 ++++++
 dlls/ddraw/tests/ddraw2.c |    6 ++++++
 dlls/ddraw/tests/ddraw4.c |    6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 8926a9c..7d97ec6 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -4078,6 +4078,12 @@ static void test_primary_palette(void)
     window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW,
             0, 0, 640, 480, 0, 0, 0, 0);
     hr = IDirectDraw_SetDisplayMode(ddraw, 640, 480, 8);
+    if (hr == E_NOTIMPL)
+    {
+        win_skip("8bpp display mode is not supported\n");
+        DestroyWindow(window);
+        return;
+    }
     ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
     hr = IDirectDraw_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
     ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index bf409f2..ea9fc5c 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -5175,6 +5175,12 @@ static void test_primary_palette(void)
     window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW,
             0, 0, 640, 480, 0, 0, 0, 0);
     hr = IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 8, 0, 0);
+    if (hr == E_NOTIMPL)
+    {
+        win_skip("8bpp display mode is not supported\n");
+        DestroyWindow(window);
+        return;
+    }
     ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
     hr = IDirectDraw2_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
     ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index 04d5049..a189dcb 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -5772,6 +5772,12 @@ static void test_primary_palette(void)
             0, 0, 640, 480, 0, 0, 0, 0);
     hr = IDirectDraw4_SetDisplayMode(ddraw, 640, 480, 8, 0, 0);
     ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
+    if (hr == E_NOTIMPL)
+    {
+        win_skip("8bpp display mode is not supported\n");
+        DestroyWindow(window);
+        return;
+    }
     hr = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
     ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
 




More information about the wine-cvs mailing list