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
c6abb3b2
Commit
c6abb3b2
authored
May 27, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
May 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/vmr9: Get rid of CreateRenderingWindow().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6ccbc057
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
22 deletions
+10
-22
vmr9.c
dlls/quartz/vmr9.c
+10
-22
No files found.
dlls/quartz/vmr9.c
View file @
c6abb3b2
...
...
@@ -2751,8 +2751,10 @@ static UINT d3d9_adapter_from_hwnd(IDirect3D9 *d3d9, HWND hwnd, HMONITOR *mon_ou
return
d3d9_adapter
;
}
static
BOOL
CreateRenderingWindow
(
struct
default_presenter
*
This
,
VMR9AllocationInfo
*
info
,
DWORD
*
numbuffers
)
static
HRESULT
WINAPI
VMR9_SurfaceAllocator_InitializeDevice
(
IVMRSurfaceAllocator9
*
iface
,
DWORD_PTR
cookie
,
VMR9AllocationInfo
*
info
,
DWORD
*
numbuffers
)
{
struct
default_presenter
*
This
=
impl_from_IVMRSurfaceAllocator9
(
iface
);
D3DPRESENT_PARAMETERS
d3dpp
;
IDirect3DDevice9
*
device
;
DWORD
d3d9_adapter
;
...
...
@@ -2760,7 +2762,9 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation
HWND
window
;
HRESULT
hr
;
TRACE
(
"(%p)->()
\n
"
,
This
);
TRACE
(
"presenter %p, cookie %#Ix, info %p, numbuffers %p.
\n
"
,
This
,
cookie
,
info
,
numbuffers
);
This
->
info
=
*
info
;
if
(
This
->
pVMR9
->
mode
==
VMR9Mode_Windowed
)
window
=
This
->
pVMR9
->
window
.
hwnd
;
...
...
@@ -2783,7 +2787,7 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation
if
(
FAILED
(
hr
))
{
ERR
(
"Could not create device: %08x
\n
"
,
hr
);
return
FALSE
;
return
hr
;
}
IDirect3DDevice9_GetDeviceCaps
(
device
,
&
caps
);
...
...
@@ -2791,14 +2795,14 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation
{
WARN
(
"Device does not support blitting from textures.
\n
"
);
IDirect3DDevice9_Release
(
device
);
return
FALS
E
;
return
VFW_E_DDRAW_CAPS_NOT_SUITABL
E
;
}
This
->
d3d9_dev
=
device
;
IVMRSurfaceAllocatorNotify9_SetD3DDevice
(
This
->
SurfaceAllocatorNotify
,
This
->
d3d9_dev
,
This
->
hMon
);
if
(
!
(
This
->
d3d9_surfaces
=
calloc
(
*
numbuffers
,
sizeof
(
IDirect3DSurface9
*
))))
return
FALSE
;
return
E_OUTOFMEMORY
;
hr
=
VMR9_SurfaceAllocator_SetAllocationSettings
(
This
,
info
);
if
(
FAILED
(
hr
))
...
...
@@ -2814,27 +2818,11 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation
if
(
FAILED
(
hr
))
{
IVMRSurfaceAllocator9_TerminateDevice
(
This
->
pVMR9
->
allocator
,
This
->
pVMR9
->
cookie
);
return
FALSE
;
return
hr
;
}
This
->
num_surfaces
=
*
numbuffers
;
return
TRUE
;
}
static
HRESULT
WINAPI
VMR9_SurfaceAllocator_InitializeDevice
(
IVMRSurfaceAllocator9
*
iface
,
DWORD_PTR
cookie
,
VMR9AllocationInfo
*
allocinfo
,
DWORD
*
numbuffers
)
{
struct
default_presenter
*
This
=
impl_from_IVMRSurfaceAllocator9
(
iface
);
This
->
info
=
*
allocinfo
;
if
(
!
CreateRenderingWindow
(
This
,
allocinfo
,
numbuffers
))
{
ERR
(
"Failed to create rendering window, expect no output!
\n
"
);
return
VFW_E_WRONG_STATE
;
}
return
S_OK
;
}
...
...
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