Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
eba2523a
Commit
eba2523a
authored
Aug 10, 2023
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Read back the swapchain size assigned by wined3d.
parent
28461117
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
3 deletions
+18
-3
swapchain.c
dlls/dxgi/swapchain.c
+6
-3
swapchain.c
dlls/wined3d/swapchain.c
+9
-0
wined3d.spec
dlls/wined3d/wined3d.spec
+1
-0
wined3d.h
include/wine/wined3d.h
+2
-0
No files found.
dlls/dxgi/swapchain.c
View file @
eba2523a
...
...
@@ -873,6 +873,7 @@ static HRESULT d3d11_swapchain_create_d3d11_textures(struct d3d11_swapchain *swa
HRESULT
d3d11_swapchain_init
(
struct
d3d11_swapchain
*
swapchain
,
struct
dxgi_device
*
device
,
struct
wined3d_swapchain_desc
*
desc
)
{
struct
wined3d_swapchain_state
*
state
;
BOOL
fullscreen
;
HRESULT
hr
;
...
...
@@ -907,6 +908,9 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
goto
cleanup
;
}
state
=
wined3d_swapchain_get_state
(
swapchain
->
wined3d_swapchain
);
wined3d_swapchain_state_get_size
(
state
,
&
desc
->
backbuffer_width
,
&
desc
->
backbuffer_height
);
if
(
FAILED
(
hr
=
d3d11_swapchain_create_d3d11_textures
(
swapchain
,
&
device
->
IWineDXGIDevice_iface
,
desc
)))
{
ERR
(
"Failed to create d3d11 textures, hr %#lx.
\n
"
,
hr
);
...
...
@@ -916,10 +920,7 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
swapchain
->
target
=
NULL
;
if
(
fullscreen
)
{
struct
wined3d_swapchain_state
*
state
;
desc
->
windowed
=
FALSE
;
state
=
wined3d_swapchain_get_state
(
swapchain
->
wined3d_swapchain
);
if
(
FAILED
(
hr
=
IDXGISwapChain1_GetContainingOutput
(
&
swapchain
->
IDXGISwapChain1_iface
,
&
swapchain
->
target
)))
...
...
@@ -3130,6 +3131,8 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI
return
hr
;
}
wined3d_swapchain_state_get_size
(
swapchain
->
state
,
&
swapchain
->
desc
.
Width
,
&
swapchain
->
desc
.
Height
);
if
(
fullscreen
)
{
wined3d_desc
.
windowed
=
FALSE
;
...
...
dlls/wined3d/swapchain.c
View file @
eba2523a
...
...
@@ -2427,6 +2427,15 @@ BOOL CDECL wined3d_swapchain_state_is_windowed(const struct wined3d_swapchain_st
return
state
->
desc
.
windowed
;
}
void
CDECL
wined3d_swapchain_state_get_size
(
const
struct
wined3d_swapchain_state
*
state
,
unsigned
int
*
width
,
unsigned
int
*
height
)
{
TRACE
(
"state %p.
\n
"
,
state
);
*
width
=
state
->
desc
.
backbuffer_width
;
*
height
=
state
->
desc
.
backbuffer_height
;
}
void
CDECL
wined3d_swapchain_state_destroy
(
struct
wined3d_swapchain_state
*
state
)
{
wined3d_swapchain_state_cleanup
(
state
);
...
...
dlls/wined3d/wined3d.spec
View file @
eba2523a
...
...
@@ -292,6 +292,7 @@
@ cdecl wined3d_swapchain_state_create(ptr ptr ptr ptr ptr)
@ cdecl wined3d_swapchain_state_destroy(ptr)
@ cdecl wined3d_swapchain_state_get_size(ptr ptr ptr)
@ cdecl wined3d_swapchain_state_is_windowed(ptr)
@ cdecl wined3d_swapchain_state_resize_target(ptr ptr)
@ cdecl wined3d_swapchain_state_set_fullscreen(ptr ptr ptr)
...
...
include/wine/wined3d.h
View file @
eba2523a
...
...
@@ -2854,6 +2854,8 @@ HRESULT __cdecl wined3d_swapchain_state_create(const struct wined3d_swapchain_de
HWND
window
,
struct
wined3d
*
wined3d
,
struct
wined3d_swapchain_state_parent
*
state_parent
,
struct
wined3d_swapchain_state
**
state
);
void
__cdecl
wined3d_swapchain_state_destroy
(
struct
wined3d_swapchain_state
*
state
);
void
__cdecl
wined3d_swapchain_state_get_size
(
const
struct
wined3d_swapchain_state
*
state
,
unsigned
int
*
width
,
unsigned
int
*
height
);
BOOL
__cdecl
wined3d_swapchain_state_is_windowed
(
const
struct
wined3d_swapchain_state
*
state
);
HRESULT
__cdecl
wined3d_swapchain_state_resize_target
(
struct
wined3d_swapchain_state
*
state
,
const
struct
wined3d_display_mode
*
mode
);
...
...
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