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
04b67522
Commit
04b67522
authored
Nov 07, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Update the swapchain flags on wined3d_device_reset().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ca87bd95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
device.c
dlls/wined3d/device.c
+21
-1
No files found.
dlls/wined3d/device.c
View file @
04b67522
...
...
@@ -4752,6 +4752,16 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
}
}
static
void
update_swapchain_flags
(
struct
wined3d_texture
*
texture
)
{
unsigned
int
flags
=
texture
->
swapchain
->
desc
.
flags
;
if
(
flags
&
WINED3D_SWAPCHAIN_GDI_COMPATIBLE
)
texture
->
flags
|=
WINED3D_TEXTURE_GET_DC
;
else
texture
->
flags
&=
~
WINED3D_TEXTURE_GET_DC
;
}
HRESULT
CDECL
wined3d_device_reset
(
struct
wined3d_device
*
device
,
const
struct
wined3d_swapchain_desc
*
swapchain_desc
,
const
struct
wined3d_display_mode
*
mode
,
wined3d_device_reset_cb
callback
,
BOOL
reset_state
)
...
...
@@ -4835,7 +4845,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
swapchain
->
desc
.
swap_effect
=
swapchain_desc
->
swap_effect
;
swapchain
->
desc
.
enable_auto_depth_stencil
=
swapchain_desc
->
enable_auto_depth_stencil
;
swapchain
->
desc
.
auto_depth_stencil_format
=
swapchain_desc
->
auto_depth_stencil_format
;
swapchain
->
desc
.
flags
=
swapchain_desc
->
flags
;
swapchain
->
desc
.
refresh_rate
=
swapchain_desc
->
refresh_rate
;
swapchain
->
desc
.
auto_restore_display_mode
=
swapchain_desc
->
auto_restore_display_mode
;
...
...
@@ -4881,6 +4890,17 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
swapchain_desc
->
multisample_type
,
swapchain_desc
->
multisample_quality
)))
return
hr
;
if
(
swapchain_desc
->
flags
!=
swapchain
->
desc
.
flags
)
{
swapchain
->
desc
.
flags
=
swapchain_desc
->
flags
;
update_swapchain_flags
(
swapchain
->
front_buffer
);
for
(
i
=
0
;
i
<
swapchain
->
desc
.
backbuffer_count
;
++
i
)
{
update_swapchain_flags
(
swapchain
->
back_buffers
[
i
]);
}
}
if
(
device
->
auto_depth_stencil_view
)
{
wined3d_rendertarget_view_decref
(
device
->
auto_depth_stencil_view
);
...
...
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