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
0f10ac93
Commit
0f10ac93
authored
Nov 28, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Create the wined3d swapchain when setting the cooperative level.
parent
39278596
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3 additions
and
17 deletions
+3
-17
ddraw.c
dlls/ddraw/ddraw.c
+0
-0
ddraw_private.h
dlls/ddraw/ddraw_private.h
+0
-1
device.c
dlls/ddraw/device.c
+1
-3
surface.c
dlls/ddraw/surface.c
+0
-11
d3d.c
dlls/ddraw/tests/d3d.c
+2
-2
No files found.
dlls/ddraw/ddraw.c
View file @
0f10ac93
This diff is collapsed.
Click to expand it.
dlls/ddraw/ddraw_private.h
View file @
0f10ac93
...
...
@@ -98,7 +98,6 @@ struct IDirectDrawImpl
DWORD
orig_bpp
;
/* D3D things */
IDirectDrawSurfaceImpl
*
d3d_target
;
HWND
d3d_window
;
IDirect3DDeviceImpl
*
d3ddevice
;
int
d3dversion
;
...
...
dlls/ddraw/device.c
View file @
0f10ac93
...
...
@@ -361,12 +361,11 @@ IDirect3DDeviceImpl_7_Release(IDirect3DDevice7 *iface)
ddraw_handle_table_destroy
(
&
This
->
handle_table
);
TRACE
(
"Releasing target %p
%p
\n
"
,
This
->
target
,
This
->
ddraw
->
d3d_
target
);
TRACE
(
"Releasing target %p
.
\n
"
,
This
->
target
);
/* Release the render target and the WineD3D render target
* (See IDirect3D7::CreateDevice for more comments on this)
*/
IDirectDrawSurface7_Release
(
&
This
->
target
->
IDirectDrawSurface7_iface
);
IDirectDrawSurface7_Release
(
&
This
->
ddraw
->
d3d_target
->
IDirectDrawSurface7_iface
);
TRACE
(
"Target release done
\n
"
);
This
->
ddraw
->
d3ddevice
=
NULL
;
...
...
@@ -6914,7 +6913,6 @@ HRESULT d3d_device_init(IDirect3DDeviceImpl *device, IDirectDrawImpl *ddraw, IDi
* In most cases, those surfaces are the same anyway, but this will simply
* add another ref which is released when the device is destroyed. */
IDirectDrawSurface7_AddRef
(
&
target
->
IDirectDrawSurface7_iface
);
IDirectDrawSurface7_AddRef
(
&
ddraw
->
d3d_target
->
IDirectDrawSurface7_iface
);
ddraw
->
d3ddevice
=
device
;
...
...
dlls/ddraw/surface.c
View file @
0f10ac93
...
...
@@ -453,20 +453,12 @@ void ddraw_surface_destroy(IDirectDrawSurfaceImpl *This)
static
void
ddraw_surface_cleanup
(
IDirectDrawSurfaceImpl
*
surface
)
{
IDirectDrawImpl
*
ddraw
=
surface
->
ddraw
;
BOOL
destroy_swapchain
=
FALSE
;
IDirectDrawSurfaceImpl
*
surf
;
IUnknown
*
ifaceToRelease
;
UINT
i
;
TRACE
(
"surface %p.
\n
"
,
surface
);
if
((
ddraw
->
d3d_initialized
&&
surface
==
ddraw
->
d3d_target
&&
DefaultSurfaceType
==
SURFACE_OPENGL
)
||
((
surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
&&
DefaultSurfaceType
!=
SURFACE_OPENGL
))
destroy_swapchain
=
TRUE
;
/* The refcount test shows that the palette is detached when the surface
* is destroyed. */
IDirectDrawSurface7_SetPalette
(
&
surface
->
IDirectDrawSurface7_iface
,
NULL
);
...
...
@@ -495,9 +487,6 @@ static void ddraw_surface_cleanup(IDirectDrawSurfaceImpl *surface)
/* Destroy the root surface. */
ddraw_surface_destroy
(
surface
);
if
(
ddraw
->
wined3d_swapchain
&&
destroy_swapchain
)
ddraw_destroy_swapchain
(
ddraw
);
/* Reduce the ddraw refcount */
if
(
ifaceToRelease
)
IUnknown_Release
(
ifaceToRelease
);
...
...
dlls/ddraw/tests/d3d.c
View file @
0f10ac93
...
...
@@ -3309,7 +3309,7 @@ static void SetRenderTargetTest(void)
ok
(
hr
==
DD_OK
,
"IDirect3DDevice7_GetRenderTarget failed, hr=0x%08x
\n
"
,
hr
);
refcount
=
getRefcount
((
IUnknown
*
)
oldrt
);
todo_wine
ok
(
refcount
==
3
,
"Refcount should be 3, returned is %d
\n
"
,
refcount
);
ok
(
refcount
==
3
,
"Refcount should be 3, returned is %d
\n
"
,
refcount
);
refcount
=
getRefcount
((
IUnknown
*
)
failrt
);
ok
(
refcount
==
1
,
"Refcount should be 1, returned is %d
\n
"
,
refcount
);
...
...
@@ -3318,7 +3318,7 @@ static void SetRenderTargetTest(void)
ok
(
hr
!=
D3D_OK
,
"IDirect3DDevice7_SetRenderTarget succeeded
\n
"
);
refcount
=
getRefcount
((
IUnknown
*
)
oldrt
);
todo_wine
ok
(
refcount
==
2
,
"Refcount should be 2, returned is %d
\n
"
,
refcount
);
ok
(
refcount
==
2
,
"Refcount should be 2, returned is %d
\n
"
,
refcount
);
refcount
=
getRefcount
((
IUnknown
*
)
failrt
);
ok
(
refcount
==
2
,
"Refcount should be 2, returned is %d
\n
"
,
refcount
);
...
...
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