From 2e1e1e0140fb69a8173e5f57b91eaf557f3dd174 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sat, 9 Jun 2007 13:23:18 +0000 Subject: [PATCH] prepare testkit for GetDeviceIdentifier svn path=/trunk/; revision=27087 --- rostests/dxtest/ddraw/testlist.cpp | 4 +++- rostests/dxtest/ddraw/tests/CreateDDraw.cpp | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/rostests/dxtest/ddraw/testlist.cpp b/rostests/dxtest/ddraw/testlist.cpp index 54043063b9a..c87b9d24ba3 100644 --- a/rostests/dxtest/ddraw/testlist.cpp +++ b/rostests/dxtest/ddraw/testlist.cpp @@ -12,8 +12,10 @@ /* The List of tests */ TEST TestList[] = { + { "IDirectDraw: COM Stuff", Test_CreateDDraw }, - { "IDirectDraw: Display Frequency", Test_GetMonitorFrequency }, + { "IDirectDraw: GetDeviceIdentifier", Test_GetDeviceIdentifier }, + { "IDirectDraw: Display Frequency", Test_GetMonitorFrequency }, { "IDirectDraw: Display Modes", Test_DisplayModes }, { "IDirectDraw: Available Video Memory", Test_GetAvailableVidMem }, { "IDirectDraw: GetFourCC", Test_GetFourCCCodes }, diff --git a/rostests/dxtest/ddraw/tests/CreateDDraw.cpp b/rostests/dxtest/ddraw/tests/CreateDDraw.cpp index 43af1830f64..49e92b9b8f7 100644 --- a/rostests/dxtest/ddraw/tests/CreateDDraw.cpp +++ b/rostests/dxtest/ddraw/tests/CreateDDraw.cpp @@ -375,7 +375,21 @@ BOOL Test_GetFourCCCodes (INT* passed, INT* failed) return TRUE; } +BOOL Test_GetDeviceIdentifier (INT* passed, INT* failed) +{ + LPDIRECTDRAW7 DirectDraw; + /* Preparations */ + if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK) + { + printf("ERROR: Failed to set up ddraw\n"); + return FALSE; + } + + DirectDraw->Release(); + + return TRUE; +} LONG WINAPI BasicWindowProc (HWND hwnd, UINT message, UINT wParam, LONG lParam)