Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
546a60ff
Commit
546a60ff
authored
Jun 24, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Enumerate the reference d3ddevice.
parent
e18b89ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
4 deletions
+29
-4
ddraw.c
dlls/ddraw/ddraw.c
+4
-0
ddraw_private.h
dlls/ddraw/ddraw_private.h
+2
-1
direct3d.c
dlls/ddraw/direct3d.c
+23
-3
No files found.
dlls/ddraw/ddraw.c
View file @
546a60ff
...
...
@@ -159,21 +159,25 @@ IDirectDrawImpl_QueryInterface(IDirectDraw7 *iface,
if
(
IsEqualGUID
(
&
IID_IDirect3D
,
refiid
)
)
{
This
->
d3dversion
=
1
;
*
obj
=
ICOM_INTERFACE
(
This
,
IDirect3D
);
TRACE
(
" returning Direct3D interface at %p.
\n
"
,
*
obj
);
}
else
if
(
IsEqualGUID
(
&
IID_IDirect3D2
,
refiid
)
)
{
This
->
d3dversion
=
2
;
*
obj
=
ICOM_INTERFACE
(
This
,
IDirect3D2
);
TRACE
(
" returning Direct3D2 interface at %p.
\n
"
,
*
obj
);
}
else
if
(
IsEqualGUID
(
&
IID_IDirect3D3
,
refiid
)
)
{
This
->
d3dversion
=
3
;
*
obj
=
ICOM_INTERFACE
(
This
,
IDirect3D3
);
TRACE
(
" returning Direct3D3 interface at %p.
\n
"
,
*
obj
);
}
else
if
(
IsEqualGUID
(
&
IID_IDirect3D7
,
refiid
))
{
This
->
d3dversion
=
7
;
*
obj
=
ICOM_INTERFACE
(
This
,
IDirect3D7
);
TRACE
(
" returning Direct3D7 interface at %p.
\n
"
,
*
obj
);
}
...
...
dlls/ddraw/ddraw_private.h
View file @
546a60ff
...
...
@@ -119,13 +119,14 @@ struct IDirectDrawImpl
IDirectDrawSurfaceImpl
*
d3d_target
;
HWND
d3d_window
;
IDirect3DDeviceImpl
*
d3ddevice
;
int
d3dversion
;
/* Varios HWNDs */
HWND
focuswindow
;
HWND
devicewindow
;
/* The surface type to request */
WINED3DSURFTYPE
ImplType
;
WINED3DSURFTYPE
ImplType
;
/* The surface list - can't relay this to WineD3D
* because of IParent
...
...
dlls/ddraw/direct3d.c
View file @
546a60ff
...
...
@@ -276,7 +276,7 @@ IDirect3DImpl_3_EnumDevices(IDirect3D3 *iface,
hr
=
IDirect3DImpl_GetCaps
(
This
->
wineD3D
,
&
dref
,
&
newDesc
);
if
(
hr
!=
D3D_OK
)
return
hr
;
/* Do I have to enumerate the reference id?
I try without.
Note from old d3d7:
/* Do I have to enumerate the reference id? Note from old d3d7:
* "It seems that enumerating the reference IID on Direct3D 1 games
* (AvP / Motoracer2) breaks them". So do not enumerate this iid in V1
*
...
...
@@ -284,14 +284,34 @@ IDirect3DImpl_3_EnumDevices(IDirect3D3 *iface,
* which enables / disables enumerating the reference rasterizer. It's a DWORD,
* 0 means disabled, 2 means enabled. The enablerefrast.reg and disablerefrast.reg
* files in the DirectX 7.0 sdk demo directory suggest this.
*
* Some games(GTA 2) seem to use the secound enumerated device, so I have to enumerate
* at least 2 devices. So enumerate the reference device to have 2 devices.
*/
if
(
This
->
d3dversion
!=
1
)
{
TRACE
(
"(%p) Enumerating WineD3D D3DDevice interface
\n
"
,
This
);
d1
=
dref
;
d2
=
dref
;
hr
=
Callback
(
(
LPIID
)
&
IID_IDirect3DRefDevice
,
"Reference Direct3D ID"
,
device_name
,
&
d1
,
&
d2
,
Context
);
if
(
hr
!=
D3DENUMRET_OK
)
{
TRACE
(
"Application cancelled the enumeration
\n
"
);
return
D3D_OK
;
}
}
TRACE
(
"(%p) Enumerating WineD3D D3DDevice interface
\n
"
,
This
);
d1
=
dref
;
d2
=
dref
;
Callback
(
(
LPIID
)
&
IID_D3DDEVICE_WineD3D
,
"Wine D3DDevice using WineD3D and OpenGL"
,
device_name
,
&
d1
,
&
d2
,
Context
);
hr
=
Callback
(
(
LPIID
)
&
IID_D3DDEVICE_WineD3D
,
"Wine D3DDevice using WineD3D and OpenGL"
,
device_name
,
&
d1
,
&
d2
,
Context
);
if
(
hr
!=
D3DENUMRET_OK
)
{
TRACE
(
"Application cancelled the enumeration
\n
"
);
return
D3D_OK
;
}
TRACE
(
"(%p) End of enumeration
\n
"
,
This
);
if
(
hr
!=
D3DENUMRET_OK
)
return
D3D_OK
;
return
D3D_OK
;
}
...
...
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