Commit 55faa6e9 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

ddraw/tests: Let tests run again on win9x.

parent e79b7473
......@@ -24,6 +24,8 @@
#include "ddraw.h"
#include "unknwn.h"
static HRESULT (WINAPI *pDirectDrawCreateEx)(LPGUID,LPVOID*,REFIID,LPUNKNOWN);
static IDirectDraw7 *ddraw = NULL;
static IDirectDrawSurface7 *primary = NULL;
......@@ -51,8 +53,15 @@ static BOOL CreateDirectDraw(void)
HRESULT hr;
DDSURFACEDESC2 ddsd;
IDirectDrawSurface7 *overlay = NULL;
HMODULE hmod = GetModuleHandleA("ddraw.dll");
pDirectDrawCreateEx = (void*)GetProcAddress(hmod, "DirectDrawCreateEx");
if (!pDirectDrawCreateEx) {
win_skip("DirectDrawCreateEx is not available\n");
return FALSE;
}
hr = DirectDrawCreateEx(NULL, (void**)&ddraw, &IID_IDirectDraw7, NULL);
hr = pDirectDrawCreateEx(NULL, (void**)&ddraw, &IID_IDirectDraw7, NULL);
ok(hr == DD_OK || hr == DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", hr);
if (!ddraw) {
trace("DirectDrawCreateEx() failed with an error %x\n", hr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment