Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
4e56a4fe
Commit
4e56a4fe
authored
13 years ago
by
Henri Verbeet
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3d8: Get rid of the implicit swapchain refcounting hacks.
parent
17c51d49
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/d3d8/device.c
+6
-9
6 additions, 9 deletions
dlls/d3d8/device.c
dlls/d3d8/swapchain.c
+1
-1
1 addition, 1 deletion
dlls/d3d8/swapchain.c
with
7 additions
and
10 deletions
dlls/d3d8/device.c
+
6
−
9
View file @
4e56a4fe
...
...
@@ -256,12 +256,9 @@ static void *d3d8_get_object(struct d3d8_handle_table *t, DWORD handle, enum d3d
static
ULONG
WINAPI
D3D8CB_DestroySwapChain
(
IWineD3DSwapChain
*
swapchain
)
{
IUnknown
*
parent
;
TRACE
(
"swapchain %p.
\n
"
,
swapchain
);
parent
=
IWineD3DSwapChain_GetParent
(
swapchain
);
return
IUnknown_Release
(
parent
);
return
IWineD3DSwapChain_Release
(
swapchain
);
}
static
inline
IDirect3DDevice8Impl
*
impl_from_IDirect3DDevice8
(
IDirect3DDevice8
*
iface
)
...
...
@@ -2913,8 +2910,8 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
IWineD3DSwapChain
**
swapchain
)
{
IDirect3DDevice8Impl
*
This
=
impl_from_IWineD3DDeviceParent
(
iface
);
IDirect3DSwapChain8Impl
*
d3d_swapchain
;
D3DPRESENT_PARAMETERS
local_parameters
;
IDirect3DSwapChain8
*
d3d_swapchain
;
HRESULT
hr
;
TRACE
(
"iface %p, present_parameters %p, swapchain %p
\n
"
,
iface
,
present_parameters
,
swapchain
);
...
...
@@ -2935,7 +2932,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar
local_parameters
.
FullScreen_PresentationInterval
=
present_parameters
->
PresentationInterval
;
hr
=
IDirect3DDevice8_CreateAdditionalSwapChain
(
&
This
->
IDirect3DDevice8_iface
,
&
local_parameters
,
(
IDirect3DSwapChain8
**
)
&
d3d_swapchain
);
&
local_parameters
,
&
d3d_swapchain
);
if
(
FAILED
(
hr
))
{
ERR
(
"(%p) CreateAdditionalSwapChain failed, returning %#x
\n
"
,
iface
,
hr
);
...
...
@@ -2943,9 +2940,9 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSwapChain(IWineD3DDevicePar
return
hr
;
}
*
swapchain
=
d3d_swapchain
->
wineD3DSwapChain
;
I
Unknown_Release
(
d3d_swapchain
->
parentDevice
);
d3d_swapchain
->
parentDevice
=
NULL
;
*
swapchain
=
((
IDirect3DSwapChain8Impl
*
)
d3d_swapchain
)
->
wineD3DSwapChain
;
I
WineD3DSwapChain_AddRef
(
*
swapchain
);
IDirect3DSwapChain8_Release
(
d3d_swapchain
)
;
/* Copy back the presentation parameters */
present_parameters
->
BackBufferWidth
=
local_parameters
.
BackBufferWidth
;
...
...
This diff is collapsed.
Click to expand it.
dlls/d3d8/swapchain.c
+
1
−
1
View file @
4e56a4fe
...
...
@@ -78,7 +78,7 @@ static ULONG WINAPI IDirect3DSwapChain8Impl_Release(IDirect3DSwapChain8 *iface)
IDirect3DDevice8
*
parentDevice
=
This
->
parentDevice
;
wined3d_mutex_lock
();
IWineD3DSwapChain_
Destroy
(
This
->
wineD3DSwapChain
);
IWineD3DSwapChain_
Release
(
This
->
wineD3DSwapChain
);
wined3d_mutex_unlock
();
if
(
parentDevice
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment