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
74e0985e
Commit
74e0985e
authored
Apr 06, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Make GetCurrentImage() work without output window.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2bf3a585
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
presenter.c
dlls/evr/presenter.c
+12
-13
No files found.
dlls/evr/presenter.c
View file @
74e0985e
...
...
@@ -492,28 +492,29 @@ static void video_presenter_sample_present(struct video_presenter *presenter, IM
IDirect3DDevice9
*
device
;
HRESULT
hr
;
if
(
!
presenter
->
swapchain
)
return
;
if
(
FAILED
(
hr
=
video_presenter_get_sample_surface
(
sample
,
&
surface
)))
{
WARN
(
"Failed to get sample surface, hr %#lx.
\n
"
,
hr
);
return
;
}
if
(
FAILED
(
hr
=
IDirect3DSwapChain9_GetBackBuffer
(
presenter
->
swapchain
,
0
,
D3DBACKBUFFER_TYPE_MONO
,
&
backbuffer
)))
if
(
presenter
->
swapchain
)
{
if
(
SUCCEEDED
(
hr
=
IDirect3DSwapChain9_GetBackBuffer
(
presenter
->
swapchain
,
0
,
D3DBACKBUFFER_TYPE_MONO
,
&
backbuffer
)))
{
WARN
(
"Failed to get a backbuffer, hr %#lx.
\n
"
,
hr
);
IDirect3DSurface9_Release
(
surface
);
return
;
}
IDirect3DSwapChain9_GetDevice
(
presenter
->
swapchain
,
&
device
);
IDirect3DDevice9_StretchRect
(
device
,
surface
,
NULL
,
backbuffer
,
NULL
,
D3DTEXF_POINT
);
IDirect3DSwapChain9_Present
(
presenter
->
swapchain
,
NULL
,
NULL
,
NULL
,
NULL
,
0
);
presenter
->
frame_stats
.
presented
++
;
IDirect3DDevice9_Release
(
device
);
IDirect3DSurface9_Release
(
backbuffer
);
}
else
WARN
(
"Failed to get a backbuffer, hr %#lx.
\n
"
,
hr
);
}
EnterCriticalSection
(
&
presenter
->
cs
);
if
(
presenter
->
thread
.
queue
.
last_presented
)
IMFSample_Release
(
presenter
->
thread
.
queue
.
last_presented
);
...
...
@@ -521,8 +522,6 @@ static void video_presenter_sample_present(struct video_presenter *presenter, IM
IMFSample_AddRef
(
presenter
->
thread
.
queue
.
last_presented
);
LeaveCriticalSection
(
&
presenter
->
cs
);
IDirect3DDevice9_Release
(
device
);
IDirect3DSurface9_Release
(
backbuffer
);
IDirect3DSurface9_Release
(
surface
);
}
...
...
@@ -1493,13 +1492,13 @@ static HRESULT WINAPI video_presenter_control_GetCurrentImage(IMFVideoDisplayCon
sample
=
presenter
->
thread
.
queue
.
last_presented
;
presenter
->
thread
.
queue
.
last_presented
=
NULL
;
if
(
!
presenter
->
swapchain
||
!
sample
)
if
(
!
sample
)
{
hr
=
MF_E_INVALIDREQUEST
;
}
else
if
(
SUCCEEDED
(
hr
=
video_presenter_get_sample_surface
(
sample
,
&
surface
)))
{
IDirect3DS
wapChain9_GetDevice
(
presenter
->
swapchain
,
&
device
);
IDirect3DS
urface9_GetDevice
(
surface
,
&
device
);
IDirect3DSurface9_GetDesc
(
surface
,
&
surface_desc
);
if
(
surface_desc
.
Format
!=
D3DFMT_X8R8G8B8
)
...
...
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