diff --git a/dlls/ddraw/Makefile.in b/dlls/ddraw/Makefile.in index 8ef4542715d..1d49e7976e5 100644 --- a/dlls/ddraw/Makefile.in +++ b/dlls/ddraw/Makefile.in @@ -1,6 +1,6 @@ MODULE = ddraw.dll IMPORTLIB = ddraw -IMPORTS = dxguid uuid ole32 user32 gdi32 advapi32 +IMPORTS = dxguid uuid wined3d user32 gdi32 advapi32 C_SRCS = \ clipper.c \ diff --git a/dlls/ddraw/clipper.c b/dlls/ddraw/clipper.c index b4c493c4bad..905f006f643 100644 --- a/dlls/ddraw/clipper.c +++ b/dlls/ddraw/clipper.c @@ -307,7 +307,7 @@ HRESULT ddraw_clipper_init(IDirectDrawClipperImpl *clipper) { clipper->lpVtbl = &ddraw_clipper_vtbl; clipper->ref = 1; - clipper->wineD3DClipper = pWineDirect3DCreateClipper(); + clipper->wineD3DClipper = WineDirect3DCreateClipper(); if (!clipper->wineD3DClipper) { WARN("Failed to create wined3d clipper.\n"); diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 6aa3af6bfee..f148e29457e 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -3964,12 +3964,6 @@ DirectDrawCreateClipper(DWORD Flags, return CLASS_E_NOAGGREGATION; } - if (!LoadWineD3D()) - { - LeaveCriticalSection(&ddraw_cs); - return DDERR_NODIRECTDRAWSUPPORT; - } - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawClipperImpl)); if (object == NULL) @@ -6016,13 +6010,7 @@ HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type) ddraw->orig_width = GetSystemMetrics(SM_CXSCREEN); ddraw->orig_height = GetSystemMetrics(SM_CYSCREEN); - if (!LoadWineD3D()) - { - ERR("Failed to load wined3d - broken OpenGL setup?\n"); - return DDERR_NODIRECTDRAWSUPPORT; - } - - ddraw->wineD3D = pWineDirect3DCreate(7, &ddraw->IDirectDraw7_iface); + ddraw->wineD3D = WineDirect3DCreate(7, &ddraw->IDirectDraw7_iface); if (!ddraw->wineD3D) { WARN("Failed to create a wined3d object.\n"); diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 56df02d7fee..1fea09fff6f 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -187,10 +187,6 @@ IWineD3DVertexDeclaration *ddraw_find_decl(IDirectDrawImpl *This, DWORD fvf) DEC /* The default surface type */ extern WINED3DSURFTYPE DefaultSurfaceType DECLSPEC_HIDDEN; -extern typeof(WineDirect3DCreateClipper) *pWineDirect3DCreateClipper DECLSPEC_HIDDEN; -extern typeof(WineDirect3DCreate) *pWineDirect3DCreate DECLSPEC_HIDDEN; - - /***************************************************************************** * IDirectDrawSurface implementation structure *****************************************************************************/ diff --git a/dlls/ddraw/main.c b/dlls/ddraw/main.c index 89a8680415a..757d9c489b2 100644 --- a/dlls/ddraw/main.c +++ b/dlls/ddraw/main.c @@ -39,9 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(ddraw); /* The configured default surface */ WINED3DSURFTYPE DefaultSurfaceType = SURFACE_UNKNOWN; -typeof(WineDirect3DCreateClipper) *pWineDirect3DCreateClipper DECLSPEC_HIDDEN; -typeof(WineDirect3DCreate) *pWineDirect3DCreate DECLSPEC_HIDDEN; - /* DDraw list and critical section */ static struct list global_ddraw_list = LIST_INIT(global_ddraw_list); @@ -170,31 +167,6 @@ void *ddraw_get_object(struct ddraw_handle_table *t, DWORD handle, enum ddraw_ha return entry->object; } -/* - * Helper Function for DDRAW_Create and DirectDrawCreateClipper for - * lazy loading of the Wine D3D driver. - * - * Returns - * TRUE on success - * FALSE on failure. - */ - -BOOL LoadWineD3D(void) -{ - static HMODULE hWineD3D = (HMODULE) -1; - if (hWineD3D == (HMODULE) -1) - { - hWineD3D = LoadLibraryA("wined3d"); - if (hWineD3D) - { - pWineDirect3DCreate = (typeof(WineDirect3DCreate) *)GetProcAddress(hWineD3D, "WineDirect3DCreate"); - pWineDirect3DCreateClipper = (typeof(WineDirect3DCreateClipper) *) GetProcAddress(hWineD3D, "WineDirect3DCreateClipper"); - return TRUE; - } - } - return hWineD3D != NULL; -} - /*********************************************************************** * * Helper function for DirectDrawCreate and friends