[1/2] opengl32/tests: Add tests for special case of SetPixelFormat
Matijn Woudt
tijnema at gmail.com
Sun Nov 14 11:55:05 CST 2010
Add tests for special case of SetPixelFormat
Tests pass on my Windows XP laptop and Windows 7 PC.
The game 'Heart's Medicine Season One' depends on this behaviour.
-------------- next part --------------
From 14e1b669dfefb5e5b69dce404da852dc8ee443de Mon Sep 17 00:00:00 2001
From: Matijn Woudt <tijnema at gmail.com>
Date: Sun, 14 Nov 2010 18:37:04 +0100
Subject: [PATCH 1/2] Add tests for special case of SetPixelFormat
---
dlls/opengl32/tests/opengl.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c
index bf6269a..3f9746a 100644
--- a/dlls/opengl32/tests/opengl.c
+++ b/dlls/opengl32/tests/opengl.c
@@ -235,6 +235,15 @@ static void test_setpixelformat(HDC winhdc)
HDC hdc = GetDC(0);
ok(hdc != 0, "GetDC(0) failed!\n");
+ pf = GetPixelFormat(hdc);
+ ok(pf == 0, "GetPixelFormat should have failed, got: %i\n", pf);
+
+ res = SetPixelFormat(hdc, 1, NULL);
+ todo_wine ok(res == TRUE, "SetPixelFormat failed\n");
+
+ pf = GetPixelFormat(hdc);
+ todo_wine ok(pf == 1, "GetPixelFormat should have returned 1, got: %i\n", pf);
+
/* This should pass even on the main device context */
pf = ChoosePixelFormat(hdc, &pfd);
ok(pf != 0, "ChoosePixelFormat failed on main device context\n");
--
1.7.0.4
More information about the wine-patches
mailing list