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
cf30899f
Commit
cf30899f
authored
Apr 05, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Version 1 devices are aggregated by the surface that created them.
parent
e13de0ad
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
15 deletions
+22
-15
ddraw.c
dlls/ddraw/ddraw.c
+3
-3
ddraw_private.h
dlls/ddraw/ddraw_private.h
+4
-2
device.c
dlls/ddraw/device.c
+0
-0
surface.c
dlls/ddraw/surface.c
+15
-9
d3d.c
dlls/ddraw/tests/d3d.c
+0
-1
No files found.
dlls/ddraw/ddraw.c
View file @
cf30899f
...
...
@@ -4426,7 +4426,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
TRACE
(
"iface %p, riid %s, surface %p, device %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
surface
,
device
);
wined3d_mutex_lock
();
hr
=
d3d_device_create
(
ddraw
,
target
,
7
,
&
object
);
hr
=
d3d_device_create
(
ddraw
,
target
,
7
,
&
object
,
NULL
);
if
(
SUCCEEDED
(
hr
))
*
device
=
&
object
->
IDirect3DDevice7_iface
;
else
...
...
@@ -4454,7 +4454,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
return
CLASS_E_NOAGGREGATION
;
wined3d_mutex_lock
();
hr
=
d3d_device_create
(
ddraw
,
surface_impl
,
3
,
&
device_impl
);
hr
=
d3d_device_create
(
ddraw
,
surface_impl
,
3
,
&
device_impl
,
NULL
);
if
(
SUCCEEDED
(
hr
))
*
device
=
&
device_impl
->
IDirect3DDevice3_iface
;
else
...
...
@@ -4479,7 +4479,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
iface
,
debugstr_guid
(
riid
),
surface
,
device
);
wined3d_mutex_lock
();
hr
=
d3d_device_create
(
ddraw
,
surface_impl
,
2
,
&
device_impl
);
hr
=
d3d_device_create
(
ddraw
,
surface_impl
,
2
,
&
device_impl
,
NULL
);
if
(
SUCCEEDED
(
hr
))
*
device
=
&
device_impl
->
IDirect3DDevice2_iface
;
else
...
...
dlls/ddraw/ddraw_private.h
View file @
cf30899f
...
...
@@ -159,6 +159,7 @@ struct ddraw_surface
struct
ddraw
*
ddraw
;
struct
wined3d_surface
*
wined3d_surface
;
struct
wined3d_texture
*
wined3d_texture
;
IDirect3DDeviceImpl
*
device1
;
/* This implementation handles attaching surfaces to other surfaces */
struct
ddraw_surface
*
next_attached
;
...
...
@@ -278,10 +279,11 @@ struct IDirect3DDeviceImpl
IDirect3DDevice3
IDirect3DDevice3_iface
;
IDirect3DDevice2
IDirect3DDevice2_iface
;
IDirect3DDevice
IDirect3DDevice_iface
;
IUnknown
IUnknown_inner
;
LONG
ref
;
UINT
version
;
/* Other object connections */
IUnknown
*
outer_unknown
;
struct
wined3d_device
*
wined3d_device
;
struct
ddraw
*
ddraw
;
struct
wined3d_buffer
*
indexbuffer
;
...
...
@@ -316,7 +318,7 @@ struct IDirect3DDeviceImpl
};
HRESULT
d3d_device_create
(
struct
ddraw
*
ddraw
,
struct
ddraw_surface
*
target
,
UINT
version
,
IDirect3DDeviceImpl
**
device
)
DECLSPEC_HIDDEN
;
UINT
version
,
IDirect3DDeviceImpl
**
device
,
IUnknown
*
outer_unknown
)
DECLSPEC_HIDDEN
;
/* The IID */
extern
const
GUID
IID_D3DDEVICE_WineD3D
DECLSPEC_HIDDEN
;
...
...
dlls/ddraw/device.c
View file @
cf30899f
This diff is collapsed.
Click to expand it.
dlls/ddraw/surface.c
View file @
cf30899f
...
...
@@ -204,19 +204,23 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DHALDevice
)
||
IsEqualGUID
(
riid
,
&
IID_IDirect3DRGBDevice
))
{
IDirect3DDeviceImpl
*
device
;
HRESULT
hr
;
wined3d_mutex_lock
();
hr
=
d3d_device_create
(
This
->
ddraw
,
This
,
1
,
&
device
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
if
(
!
This
->
device1
)
{
WARN
(
"Failed to create device, hr %#x.
\n
"
,
hr
);
return
hr
;
HRESULT
hr
=
d3d_device_create
(
This
->
ddraw
,
This
,
1
,
&
This
->
device1
,
(
IUnknown
*
)
&
This
->
IDirectDrawSurface_iface
);
if
(
FAILED
(
hr
))
{
This
->
device1
=
NULL
;
wined3d_mutex_unlock
();
WARN
(
"Failed to create device, hr %#x.
\n
"
,
hr
);
return
hr
;
}
}
wined3d_mutex_unlock
();
*
obj
=
&
device
->
IDirect3DDevice_iface
;
IDirect3DDevice_AddRef
(
&
This
->
device1
->
IDirect3DDevice_iface
);
*
obj
=
&
This
->
device1
->
IDirect3DDevice_iface
;
return
S_OK
;
}
...
...
@@ -502,6 +506,8 @@ static void ddraw_surface_cleanup(struct ddraw_surface *surface)
}
}
if
(
surface
->
device1
)
IUnknown_Release
(
&
surface
->
device1
->
IUnknown_inner
);
ifaceToRelease
=
surface
->
ifaceToRelease
;
/* Destroy the root surface. */
...
...
dlls/ddraw/tests/d3d.c
View file @
cf30899f
...
...
@@ -3523,7 +3523,6 @@ static void FindDevice(void)
hr
=
IDirectDrawSurface_QueryInterface
(
Surface1
,
&
IID_IDirect3DHALDevice
,
(
void
**
)
&
d3dhal
);
/* Currently Wine only supports the creation of one Direct3D device
* for a given DirectDraw instance. */
todo_wine
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
DDERR_INVALIDPIXELFORMAT
)
/* XP/Win2003 Wow64 on VMware */
,
"Expected IDirectDrawSurface::QueryInterface to succeed, got 0x%08x
\n
"
,
hr
);
...
...
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