Commit 0a8573a2 authored by Alexandre Julliard's avatar Alexandre Julliard

winedos: Link to DirectDrawCreate through delayed imports instead of doing it by hand.

parent 00b06dac
......@@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = winedos.dll
IMPORTS = user32 kernel32 kernel ntdll
DELAYIMPORTS = ddraw
C_SRCS = \
devices.c \
......
......@@ -231,9 +231,6 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
};
static CRITICAL_SECTION vga_lock = { &critsect_debug, -1, 0, 0, 0, 0 };
typedef HRESULT (WINAPI *DirectDrawCreateProc)(LPGUID,LPDIRECTDRAW *,LPUNKNOWN);
static DirectDrawCreateProc pDirectDrawCreate;
static void CALLBACK VGA_Poll( LPVOID arg, DWORD low, DWORD high );
static HWND vga_hwnd = NULL;
......@@ -787,16 +784,7 @@ static void WINAPI VGA_DoSetMode(ULONG_PTR arg)
if (lpddraw) VGA_DoExit(0);
if (!lpddraw) {
if (!pDirectDrawCreate)
{
HMODULE hmod = LoadLibraryA( "ddraw.dll" );
if (hmod) pDirectDrawCreate = (DirectDrawCreateProc)GetProcAddress( hmod, "DirectDrawCreate" );
if (!pDirectDrawCreate) {
ERR("Can't lookup DirectDrawCreate from ddraw.dll.\n");
return;
}
}
res = pDirectDrawCreate(NULL,&lpddraw,NULL);
res = DirectDrawCreate(NULL,&lpddraw,NULL);
if (!lpddraw) {
ERR("DirectDraw is not available (res = 0x%x)\n",res);
return;
......
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