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
98b053a5
Commit
98b053a5
authored
Jan 08, 2024
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Jan 10, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Update presentation parameters when creating a swap chain.
Fixes regression introduced by
215a32d6
. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56070
parent
059b3ac7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
swapchain.c
dlls/d3d9/swapchain.c
+6
-0
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+3
-3
device.c
dlls/d3d9/tests/device.c
+5
-5
No files found.
dlls/d3d9/swapchain.c
View file @
98b053a5
...
...
@@ -370,6 +370,7 @@ static const struct wined3d_swapchain_state_parent_ops d3d9_swapchain_state_pare
static
HRESULT
swapchain_init
(
struct
d3d9_swapchain
*
swapchain
,
struct
d3d9_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
,
unsigned
int
swap_interval
)
{
struct
wined3d_swapchain_desc
swapchain_desc
;
HRESULT
hr
;
swapchain
->
refcount
=
1
;
...
...
@@ -384,6 +385,11 @@ static HRESULT swapchain_init(struct d3d9_swapchain *swapchain, struct d3d9_devi
return
hr
;
}
wined3d_swapchain_get_desc
(
swapchain
->
wined3d_swapchain
,
&
swapchain_desc
);
desc
->
backbuffer_width
=
swapchain_desc
.
backbuffer_width
;
desc
->
backbuffer_height
=
swapchain_desc
.
backbuffer_height
;
desc
->
backbuffer_format
=
swapchain_desc
.
backbuffer_format
;
swapchain
->
parent_device
=
&
device
->
IDirect3DDevice9Ex_iface
;
IDirect3DDevice9Ex_AddRef
(
swapchain
->
parent_device
);
...
...
dlls/d3d9/tests/d3d9ex.c
View file @
98b053a5
...
...
@@ -3851,11 +3851,11 @@ static void test_swapchain_parameters(void)
window
,
D3DCREATE_SOFTWARE_VERTEXPROCESSING
,
&
present_parameters
,
NULL
,
&
device
);
todo_wine
ok
(
present_parameters
.
BackBufferWidth
==
client_rect
.
right
,
"Got unexpected BackBufferWidth %u, expected %ld.
\n
"
,
ok
(
present_parameters
.
BackBufferWidth
==
client_rect
.
right
,
"Got unexpected BackBufferWidth %u, expected %ld.
\n
"
,
present_parameters
.
BackBufferWidth
,
client_rect
.
right
);
todo_wine
ok
(
present_parameters
.
BackBufferHeight
==
client_rect
.
bottom
,
"Got unexpected BackBufferHeight %u, expected %ld.
\n
"
,
ok
(
present_parameters
.
BackBufferHeight
==
client_rect
.
bottom
,
"Got unexpected BackBufferHeight %u, expected %ld.
\n
"
,
present_parameters
.
BackBufferHeight
,
client_rect
.
bottom
);
todo_wine
ok
(
present_parameters
.
BackBufferFormat
!=
D3DFMT_UNKNOWN
,
"Got unexpected BackBufferFormat %#x.
\n
"
,
ok
(
present_parameters
.
BackBufferFormat
!=
D3DFMT_UNKNOWN
,
"Got unexpected BackBufferFormat %#x.
\n
"
,
present_parameters
.
BackBufferFormat
);
ok
(
present_parameters
.
BackBufferCount
==
1
,
"Got unexpected BackBufferCount %u.
\n
"
,
present_parameters
.
BackBufferCount
);
ok
(
!
present_parameters
.
MultiSampleType
,
"Got unexpected MultiSampleType %u.
\n
"
,
present_parameters
.
MultiSampleType
);
...
...
dlls/d3d9/tests/device.c
View file @
98b053a5
...
...
@@ -1352,9 +1352,9 @@ static void test_swapchain(void)
d3dpp
.
BackBufferCount
=
0
;
hr
=
IDirect3DDevice9_CreateAdditionalSwapChain
(
device
,
&
d3dpp
,
&
swapchain1
);
ok
(
SUCCEEDED
(
hr
),
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
d3dpp
.
BackBufferWidth
==
client_rect
.
right
,
"Got unexpected BackBufferWidth %u, expected %ld.
\n
"
,
ok
(
d3dpp
.
BackBufferWidth
==
client_rect
.
right
,
"Got unexpected BackBufferWidth %u, expected %ld.
\n
"
,
d3dpp
.
BackBufferWidth
,
client_rect
.
right
);
todo_wine
ok
(
d3dpp
.
BackBufferHeight
==
client_rect
.
bottom
,
"Got unexpected BackBufferHeight %u, expected %ld.
\n
"
,
ok
(
d3dpp
.
BackBufferHeight
==
client_rect
.
bottom
,
"Got unexpected BackBufferHeight %u, expected %ld.
\n
"
,
d3dpp
.
BackBufferHeight
,
client_rect
.
bottom
);
ok
(
d3dpp
.
BackBufferFormat
==
D3DFMT_A8R8G8B8
,
"Got unexpected BackBufferFormat %#x.
\n
"
,
d3dpp
.
BackBufferFormat
);
ok
(
d3dpp
.
BackBufferCount
==
1
,
"Got unexpected BackBufferCount %u.
\n
"
,
d3dpp
.
BackBufferCount
);
...
...
@@ -12521,11 +12521,11 @@ static void test_swapchain_parameters(void)
&
present_parameters
,
&
device
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
present_parameters
.
BackBufferWidth
==
client_rect
.
right
,
"Got unexpected BackBufferWidth %u, expected %ld.
\n
"
,
ok
(
present_parameters
.
BackBufferWidth
==
client_rect
.
right
,
"Got unexpected BackBufferWidth %u, expected %ld.
\n
"
,
present_parameters
.
BackBufferWidth
,
client_rect
.
right
);
todo_wine
ok
(
present_parameters
.
BackBufferHeight
==
client_rect
.
bottom
,
"Got unexpected BackBufferHeight %u, expected %ld.
\n
"
,
ok
(
present_parameters
.
BackBufferHeight
==
client_rect
.
bottom
,
"Got unexpected BackBufferHeight %u, expected %ld.
\n
"
,
present_parameters
.
BackBufferHeight
,
client_rect
.
bottom
);
todo_wine
ok
(
present_parameters
.
BackBufferFormat
!=
D3DFMT_UNKNOWN
,
"Got unexpected BackBufferFormat %#x.
\n
"
,
ok
(
present_parameters
.
BackBufferFormat
!=
D3DFMT_UNKNOWN
,
"Got unexpected BackBufferFormat %#x.
\n
"
,
present_parameters
.
BackBufferFormat
);
ok
(
present_parameters
.
BackBufferCount
==
1
,
"Got unexpected BackBufferCount %u.
\n
"
,
present_parameters
.
BackBufferCount
);
ok
(
!
present_parameters
.
MultiSampleType
,
"Got unexpected MultiSampleType %u.
\n
"
,
present_parameters
.
MultiSampleType
);
...
...
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