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
75f7bd0e
Commit
75f7bd0e
authored
Feb 27, 2023
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Unlock the wined3d mutex after storing the new target.
Otherwise a second thread might set it to something else between the unlock and assignment.
parent
52bdd0db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
swapchain.c
dlls/dxgi/swapchain.c
+18
-13
No files found.
dlls/dxgi/swapchain.c
View file @
75f7bd0e
...
...
@@ -410,12 +410,11 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreen
swapchain_desc
.
output
=
dxgi_output
->
wined3d_output
;
swapchain_desc
.
windowed
=
!
fullscreen
;
hr
=
wined3d_swapchain_state_set_fullscreen
(
state
,
&
swapchain_desc
,
NULL
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
IDXGIOutput_Release
(
target
);
return
DXGI_ERROR_NOT_CURRENTLY_AVAILABLE
;
hr
=
DXGI_ERROR_NOT_CURRENTLY_AVAILABLE
;
goto
done
;
}
if
(
!
fullscreen
)
...
...
@@ -428,7 +427,9 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreen
IDXGIOutput_Release
(
swapchain
->
target
);
swapchain
->
target
=
target
;
return
S_OK
;
done:
wined3d_mutex_unlock
();
return
hr
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetFullscreenState
(
IDXGISwapChain1
*
iface
,
...
...
@@ -2098,13 +2099,20 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreen
if
(
FAILED
(
hr
=
wined3d_swapchain_desc_from_dxgi
(
&
wined3d_desc
,
target
,
window
,
swapchain_desc
,
fullscreen_desc
)))
goto
fail
;
{
IDXGIOutput_Release
(
target
);
return
hr
;
}
wined3d_mutex_lock
();
wined3d_desc
.
windowed
=
!
fullscreen
;
hr
=
wined3d_swapchain_state_set_fullscreen
(
swapchain
->
state
,
&
wined3d_desc
,
NULL
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
goto
fail
;
{
IDXGIOutput_Release
(
target
);
hr
=
DXGI_ERROR_NOT_CURRENTLY_AVAILABLE
;
goto
done
;
}
fullscreen_desc
->
Windowed
=
wined3d_desc
.
windowed
;
if
(
!
fullscreen
)
...
...
@@ -2117,12 +2125,9 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreen
IDXGIOutput_Release
(
swapchain
->
target
);
swapchain
->
target
=
target
;
return
S_OK
;
fail:
IDXGIOutput_Release
(
target
);
return
DXGI_ERROR_NOT_CURRENTLY_AVAILABLE
;
done:
wined3d_mutex_unlock
();
return
hr
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d12_swapchain_GetFullscreenState
(
IDXGISwapChain4
*
iface
,
...
...
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