Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d99c7d59
Commit
d99c7d59
authored
Aug 03, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Aug 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Don't link to wined3d, load it at runtime.
This lets ddraw dlls built on a machine with OpenGL present run on other machines that may not have the OpenGL libraries installed.
parent
3538c0cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
Makefile.in
dlls/ddraw/Makefile.in
+1
-1
main.c
dlls/ddraw/main.c
+20
-1
No files found.
dlls/ddraw/Makefile.in
View file @
d99c7d59
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
ddraw.dll
IMPORTLIB
=
libddraw.
$(IMPLIBEXT)
IMPORTS
=
wined3d
ole32 user32 gdi32 advapi32 kernel32 ntdll
IMPORTS
=
ole32 user32 gdi32 advapi32 kernel32 ntdll
EXTRAINCL
=
@X_CFLAGS@
EXTRALIBS
=
-ldxguid
-luuid
@X_LIBS@ @X_PRE_LIBS@ @XLIB@ @X_EXTRA_LIBS@
...
...
dlls/ddraw/main.c
View file @
d99c7d59
...
...
@@ -48,6 +48,11 @@
#include "ddraw_private.h"
typedef
IWineD3D
*
(
WINAPI
*
fnWineDirect3DCreate
)(
UINT
,
UINT
,
IUnknown
*
);
static
HMODULE
hWineD3D
=
(
HMODULE
)
-
1
;
static
fnWineDirect3DCreate
pWineDirect3DCreate
;
WINE_DEFAULT_DEBUG_CHANNEL
(
ddraw
);
/* The configured default surface */
...
...
@@ -149,13 +154,27 @@ DDRAW_Create(GUID *guid,
This
->
orig_width
=
GetSystemMetrics
(
SM_CXSCREEN
);
This
->
orig_height
=
GetSystemMetrics
(
SM_CYSCREEN
);
if
(
hWineD3D
==
(
HMODULE
)
-
1
)
{
hWineD3D
=
LoadLibraryA
(
"wined3d"
);
if
(
hWineD3D
)
pWineDirect3DCreate
=
(
fnWineDirect3DCreate
)
GetProcAddress
(
hWineD3D
,
"WineDirect3DCreate"
);
}
if
(
!
hWineD3D
)
{
ERR
(
"Couldn't load WineD3D - OpenGL libs not present?
\n
"
);
hr
=
E_NOTIMPL
;
goto
err_out
;
}
/* Initialize WineD3D
*
* All Rendering (2D and 3D) is relayed to WineD3D,
* but DirectDraw specific management, like DDSURFACEDESC and DDPIXELFORMAT
* structure handling is handled in this lib.
*/
wineD3D
=
WineDirect3DCreate
(
0
/* SDKVersion */
,
7
/* DXVersion */
,
(
IUnknown
*
)
This
/* Parent */
);
wineD3D
=
p
WineDirect3DCreate
(
0
/* SDKVersion */
,
7
/* DXVersion */
,
(
IUnknown
*
)
This
/* Parent */
);
if
(
!
wineD3D
)
{
ERR
(
"Failed to initialise WineD3D
\n
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment