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
6b519355
Commit
6b519355
authored
Sep 28, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Oct 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Replace NULL device_window with focus window in swapchain desc.
parent
832383f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
device.c
dlls/d3d9/tests/device.c
+3
-3
device.c
dlls/wined3d/device.c
+6
-4
swapchain.c
dlls/wined3d/swapchain.c
+7
-1
No files found.
dlls/d3d9/tests/device.c
View file @
6b519355
...
...
@@ -1354,7 +1354,7 @@ static void test_swapchain(void)
ok
(
hr
==
D3D_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DSwapChain9_GetPresentParameters
(
swapchain2
,
&
d3dpp
);
ok
(
hr
==
D3D_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
d3dpp
.
hDeviceWindow
==
window
,
"Got window %p, expected %p.
\n
"
,
d3dpp
.
hDeviceWindow
,
window
);
ok
(
d3dpp
.
hDeviceWindow
==
window
,
"Got window %p, expected %p.
\n
"
,
d3dpp
.
hDeviceWindow
,
window
);
d3dpp
.
BackBufferCount
=
2
;
hr
=
IDirect3DDevice9_CreateAdditionalSwapChain
(
device
,
&
d3dpp
,
&
swapchain3
);
...
...
@@ -12242,7 +12242,7 @@ static void test_swapchain_parameters(void)
hr
=
IDirect3DSwapChain9_GetPresentParameters
(
swapchain
,
&
present_parameters2
);
ok
(
hr
==
D3D_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
present_parameters2
.
hDeviceWindow
==
window
,
"Got window %p, expected %p.
\n
"
,
ok
(
present_parameters2
.
hDeviceWindow
==
window
,
"Got window %p, expected %p.
\n
"
,
present_parameters2
.
hDeviceWindow
,
window
);
ok
(
present_parameters2
.
SwapEffect
==
tests
[
i
].
swap_effect
,
"Swap effect changed from %u to %u, test %u.
\n
"
,
tests
[
i
].
swap_effect
,
present_parameters2
.
SwapEffect
,
i
);
...
...
@@ -12283,7 +12283,7 @@ static void test_swapchain_parameters(void)
ok
(
hr
==
D3D_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirect3DSwapChain9_GetPresentParameters
(
swapchain
,
&
present_parameters2
);
ok
(
hr
==
D3D_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
present_parameters2
.
hDeviceWindow
==
window
,
"Got window %p, expected %p.
\n
"
,
ok
(
present_parameters2
.
hDeviceWindow
==
window
,
"Got window %p, expected %p.
\n
"
,
present_parameters2
.
hDeviceWindow
,
window
);
IDirect3DSwapChain9_Release
(
swapchain
);
IDirect3DDevice9_Release
(
device
);
...
...
dlls/wined3d/device.c
View file @
6b519355
...
...
@@ -5582,6 +5582,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
struct
wined3d_view_desc
view_desc
;
BOOL
backbuffer_resized
,
windowed
;
HRESULT
hr
=
WINED3D_OK
;
HWND
device_window
;
unsigned
int
i
;
TRACE
(
"device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.
\n
"
,
...
...
@@ -5658,12 +5659,13 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
current_desc
->
refresh_rate
=
swapchain_desc
->
refresh_rate
;
current_desc
->
auto_restore_display_mode
=
swapchain_desc
->
auto_restore_display_mode
;
if
(
swapchain_desc
->
device_window
&&
swapchain_desc
->
device_window
!=
current_desc
->
device_window
)
device_window
=
swapchain_desc
->
device_window
?
swapchain_desc
->
device_window
:
device
->
create_parms
.
focus_window
;
if
(
device_window
&&
device_window
!=
current_desc
->
device_window
)
{
TRACE
(
"Changing the device window from %p to %p.
\n
"
,
current_desc
->
device_window
,
swapchain_desc
->
device_window
);
current_desc
->
device_window
=
swapchain_desc
->
device_window
;
swapchain_state
->
device_window
=
swapchain_desc
->
device_window
;
current_desc
->
device_window
,
device_window
);
current_desc
->
device_window
=
device_window
;
swapchain_state
->
device_window
=
device_window
;
wined3d_swapchain_set_window
(
swapchain
,
NULL
);
}
...
...
dlls/wined3d/swapchain.c
View file @
6b519355
...
...
@@ -1459,7 +1459,13 @@ static HRESULT wined3d_swapchain_init(struct wined3d_swapchain *swapchain, struc
&&
desc
->
swap_effect
!=
WINED3D_SWAP_EFFECT_COPY
)
FIXME
(
"Unimplemented swap effect %#x.
\n
"
,
desc
->
swap_effect
);
window
=
desc
->
device_window
?
desc
->
device_window
:
device
->
create_parms
.
focus_window
;
if
(
!
desc
->
device_window
)
{
TRACE
(
"Updating device_window to %p.
\n
"
,
device
->
create_parms
.
focus_window
);
desc
->
device_window
=
device
->
create_parms
.
focus_window
;
}
window
=
desc
->
device_window
;
if
(
FAILED
(
hr
=
wined3d_swapchain_state_init
(
&
swapchain
->
state
,
desc
,
window
,
device
->
wined3d
,
state_parent
)))
{
ERR
(
"Failed to initialise swapchain state, hr %#x.
\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