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
855f17f3
Commit
855f17f3
authored
May 06, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Rename "baseControlWindow" to "window".
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
148fc1ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
51 deletions
+52
-51
videorenderer.c
dlls/quartz/videorenderer.c
+29
-28
vmr9.c
dlls/quartz/vmr9.c
+23
-23
No files found.
dlls/quartz/videorenderer.c
View file @
855f17f3
...
...
@@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
struct
video_renderer
{
struct
strmbase_renderer
renderer
;
struct
video_window
baseControlW
indow
;
struct
video_window
w
indow
;
BaseControlVideo
baseControlVideo
;
IOverlay
IOverlay_iface
;
...
...
@@ -58,7 +58,7 @@ struct video_renderer
static
inline
struct
video_renderer
*
impl_from_video_window
(
struct
video_window
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
baseControlW
indow
);
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
w
indow
);
}
static
inline
struct
video_renderer
*
impl_from_strmbase_renderer
(
struct
strmbase_renderer
*
iface
)
...
...
@@ -68,7 +68,7 @@ static inline struct video_renderer *impl_from_strmbase_renderer(struct strmbase
static
inline
struct
video_renderer
*
impl_from_IVideoWindow
(
IVideoWindow
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
baseControlW
indow
.
IVideoWindow_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
video_renderer
,
w
indow
.
IVideoWindow_iface
);
}
static
inline
struct
video_renderer
*
impl_from_BaseControlVideo
(
BaseControlVideo
*
iface
)
...
...
@@ -86,8 +86,8 @@ static const BITMAPINFOHEADER *get_bitmap_header(const AM_MEDIA_TYPE *mt)
static
void
VideoRenderer_AutoShowWindow
(
struct
video_renderer
*
This
)
{
if
(
This
->
baseControlW
indow
.
AutoShow
)
ShowWindow
(
This
->
baseControlW
indow
.
hwnd
,
SW_SHOW
);
if
(
This
->
w
indow
.
AutoShow
)
ShowWindow
(
This
->
w
indow
.
hwnd
,
SW_SHOW
);
}
static
HRESULT
WINAPI
VideoRenderer_ShouldDrawSampleNow
(
struct
strmbase_renderer
*
filter
,
...
...
@@ -115,7 +115,7 @@ static HRESULT WINAPI VideoRenderer_DoRenderSample(struct strmbase_renderer *ifa
return
hr
;
}
dc
=
GetDC
(
filter
->
baseControlW
indow
.
hwnd
);
dc
=
GetDC
(
filter
->
w
indow
.
hwnd
);
StretchDIBits
(
dc
,
filter
->
DestRect
.
left
,
filter
->
DestRect
.
top
,
filter
->
DestRect
.
right
-
filter
->
DestRect
.
left
,
filter
->
DestRect
.
bottom
-
filter
->
DestRect
.
top
,
...
...
@@ -123,7 +123,7 @@ static HRESULT WINAPI VideoRenderer_DoRenderSample(struct strmbase_renderer *ifa
filter
->
SourceRect
.
right
-
filter
->
SourceRect
.
left
,
filter
->
SourceRect
.
bottom
-
filter
->
SourceRect
.
top
,
pbSrcStream
,
(
BITMAPINFO
*
)
get_bitmap_header
(
&
filter
->
renderer
.
sink
.
pin
.
mt
),
DIB_RGB_COLORS
,
SRCCOPY
);
ReleaseDC
(
filter
->
baseControlW
indow
.
hwnd
,
dc
);
ReleaseDC
(
filter
->
w
indow
.
hwnd
,
dc
);
if
(
filter
->
renderer
.
filter
.
state
==
State_Paused
)
{
...
...
@@ -163,7 +163,7 @@ static void video_renderer_destroy(struct strmbase_renderer *iface)
{
struct
video_renderer
*
filter
=
impl_from_strmbase_renderer
(
iface
);
video_window_cleanup
(
&
filter
->
baseControlW
indow
);
video_window_cleanup
(
&
filter
->
w
indow
);
CloseHandle
(
filter
->
run_event
);
strmbase_renderer_cleanup
(
&
filter
->
renderer
);
free
(
filter
);
...
...
@@ -178,7 +178,7 @@ static HRESULT video_renderer_query_interface(struct strmbase_renderer *iface, R
if
(
IsEqualGUID
(
iid
,
&
IID_IBasicVideo
))
*
out
=
&
filter
->
baseControlVideo
.
IBasicVideo_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IVideoWindow
))
*
out
=
&
filter
->
baseControlW
indow
.
IVideoWindow_iface
;
*
out
=
&
filter
->
w
indow
.
IVideoWindow_iface
;
else
return
E_NOINTERFACE
;
...
...
@@ -212,9 +212,9 @@ static void video_renderer_stop_stream(struct strmbase_renderer *iface)
TRACE
(
"(%p)->()
\n
"
,
This
);
if
(
This
->
baseControlW
indow
.
AutoShow
)
if
(
This
->
w
indow
.
AutoShow
)
/* Black it out */
RedrawWindow
(
This
->
baseControlW
indow
.
hwnd
,
NULL
,
NULL
,
RDW_INVALIDATE
|
RDW_ERASE
);
RedrawWindow
(
This
->
w
indow
.
hwnd
,
NULL
,
NULL
,
RDW_INVALIDATE
|
RDW_ERASE
);
ResetEvent
(
This
->
run_event
);
}
...
...
@@ -230,7 +230,7 @@ static HRESULT video_renderer_connect(struct strmbase_renderer *iface, const AM_
{
struct
video_renderer
*
filter
=
impl_from_strmbase_renderer
(
iface
);
const
BITMAPINFOHEADER
*
bitmap_header
=
get_bitmap_header
(
mt
);
HWND
window
=
filter
->
baseControlW
indow
.
hwnd
;
HWND
window
=
filter
->
w
indow
.
hwnd
;
RECT
rect
;
filter
->
VideoWidth
=
bitmap_header
->
biWidth
;
...
...
@@ -404,7 +404,7 @@ static HRESULT WINAPI VideoRenderer_SetDefaultTargetRect(BaseControlVideo* iface
struct
video_renderer
*
This
=
impl_from_BaseControlVideo
(
iface
);
RECT
rect
;
if
(
!
GetClientRect
(
This
->
baseControlW
indow
.
hwnd
,
&
rect
))
if
(
!
GetClientRect
(
This
->
w
indow
.
hwnd
,
&
rect
))
return
E_FAIL
;
SetRect
(
&
This
->
DestRect
,
0
,
0
,
rect
.
right
,
rect
.
bottom
);
...
...
@@ -457,26 +457,27 @@ static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface,
static
HRESULT
WINAPI
VideoWindow_put_FullScreenMode
(
IVideoWindow
*
iface
,
LONG
fullscreen
)
{
struct
video_renderer
*
filter
=
impl_from_IVideoWindow
(
iface
);
HWND
window
=
filter
->
window
.
hwnd
;
FIXME
(
"filter %p, fullscreen %d.
\n
"
,
filter
,
fullscreen
);
if
(
fullscreen
)
{
filter
->
saved_style
=
GetWindowLongW
(
filter
->
baseControlWindow
.
hwnd
,
GWL_STYLE
);
ShowWindow
(
filter
->
baseControlWindow
.
hwnd
,
SW_HIDE
);
SetParent
(
filter
->
baseControlWindow
.
hwnd
,
NULL
);
SetWindowLongW
(
filter
->
baseControlWindow
.
hwnd
,
GWL_STYLE
,
WS_POPUP
);
SetWindowPos
(
filter
->
baseControlWindow
.
hwnd
,
HWND_TOP
,
0
,
0
,
filter
->
saved_style
=
GetWindowLongW
(
window
,
GWL_STYLE
);
ShowWindow
(
window
,
SW_HIDE
);
SetParent
(
window
,
NULL
);
SetWindowLongW
(
window
,
GWL_STYLE
,
WS_POPUP
);
SetWindowPos
(
window
,
HWND_TOP
,
0
,
0
,
GetSystemMetrics
(
SM_CXSCREEN
),
GetSystemMetrics
(
SM_CYSCREEN
),
SWP_SHOWWINDOW
);
GetWindowRect
(
filter
->
baseControlWindow
.
hwnd
,
&
filter
->
DestRect
);
GetWindowRect
(
window
,
&
filter
->
DestRect
);
}
else
{
ShowWindow
(
filter
->
baseControlWindow
.
hwnd
,
SW_HIDE
);
SetParent
(
filter
->
baseControlWindow
.
hwnd
,
filter
->
baseControlW
indow
.
hwndOwner
);
SetWindowLongW
(
filter
->
baseControlWindow
.
hwnd
,
GWL_STYLE
,
filter
->
saved_style
);
GetClientRect
(
filter
->
baseControlWindow
.
hwnd
,
&
filter
->
DestRect
);
SetWindowPos
(
filter
->
baseControlWindow
.
hwnd
,
0
,
filter
->
DestRect
.
left
,
filter
->
DestRect
.
top
,
ShowWindow
(
window
,
SW_HIDE
);
SetParent
(
window
,
filter
->
w
indow
.
hwndOwner
);
SetWindowLongW
(
window
,
GWL_STYLE
,
filter
->
saved_style
);
GetClientRect
(
window
,
&
filter
->
DestRect
);
SetWindowPos
(
window
,
0
,
filter
->
DestRect
.
left
,
filter
->
DestRect
.
top
,
filter
->
DestRect
.
right
,
filter
->
DestRect
.
bottom
,
SWP_NOZORDER
|
SWP_SHOWWINDOW
);
}
filter
->
FullScreenMode
=
fullscreen
;
...
...
@@ -593,7 +594,7 @@ static HRESULT WINAPI overlay_GetWindowHandle(IOverlay *iface, HWND *window)
TRACE
(
"filter %p, window %p.
\n
"
,
filter
,
window
);
*
window
=
filter
->
baseControlW
indow
.
hwnd
;
*
window
=
filter
->
w
indow
.
hwnd
;
return
S_OK
;
}
...
...
@@ -649,14 +650,14 @@ HRESULT video_renderer_create(IUnknown *outer, IUnknown **out)
strmbase_renderer_init
(
&
object
->
renderer
,
outer
,
&
CLSID_VideoRenderer
,
L"In"
,
&
renderer_ops
);
object
->
IOverlay_iface
.
lpVtbl
=
&
overlay_vtbl
;
video_window_init
(
&
object
->
baseControlW
indow
,
&
IVideoWindow_VTable
,
video_window_init
(
&
object
->
w
indow
,
&
IVideoWindow_VTable
,
&
object
->
renderer
.
filter
,
&
object
->
renderer
.
sink
.
pin
,
&
window_ops
);
basic_video_init
(
&
object
->
baseControlVideo
,
&
object
->
renderer
.
filter
,
&
object
->
renderer
.
sink
.
pin
,
&
renderer_BaseControlVideoFuncTable
);
if
(
FAILED
(
hr
=
video_window_create_window
(
&
object
->
baseControlW
indow
)))
if
(
FAILED
(
hr
=
video_window_create_window
(
&
object
->
w
indow
)))
{
video_window_cleanup
(
&
object
->
baseControlW
indow
);
video_window_cleanup
(
&
object
->
w
indow
);
strmbase_renderer_cleanup
(
&
object
->
renderer
);
free
(
object
);
return
hr
;
...
...
dlls/quartz/vmr9.c
View file @
855f17f3
...
...
@@ -56,7 +56,7 @@ static const BITMAPINFOHEADER *get_bitmap_header(const AM_MEDIA_TYPE *mt)
struct
quartz_vmr
{
struct
strmbase_renderer
renderer
;
struct
video_window
baseControlW
indow
;
struct
video_window
w
indow
;
BaseControlVideo
baseControlVideo
;
IAMCertifiedOutputProtection
IAMCertifiedOutputProtection_iface
;
...
...
@@ -119,7 +119,7 @@ static inline BOOL is_vmr9(const struct quartz_vmr *filter)
static
inline
struct
quartz_vmr
*
impl_from_video_window
(
struct
video_window
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
quartz_vmr
,
baseControlW
indow
);
return
CONTAINING_RECORD
(
iface
,
struct
quartz_vmr
,
w
indow
);
}
static
inline
struct
quartz_vmr
*
impl_from_BaseControlVideo
(
BaseControlVideo
*
cvid
)
...
...
@@ -415,7 +415,7 @@ static HRESULT allocate_surfaces(struct quartz_vmr *filter, const AM_MEDIA_TYPE
};
TRACE
(
"Initializing in mode %u, our window %p, clipping window %p.
\n
"
,
filter
->
mode
,
filter
->
baseControlW
indow
.
hwnd
,
filter
->
hWndClippingWindow
);
filter
->
mode
,
filter
->
w
indow
.
hwnd
,
filter
->
hWndClippingWindow
);
if
(
filter
->
mode
==
VMR9Mode_Windowless
&&
!
filter
->
hWndClippingWindow
)
return
S_OK
;
...
...
@@ -481,7 +481,7 @@ static void vmr_start_stream(struct strmbase_renderer *iface)
TRACE
(
"(%p)
\n
"
,
This
);
IVMRImagePresenter9_StartPresenting
(
This
->
presenter
,
This
->
cookie
);
ShowWindow
(
This
->
baseControlW
indow
.
hwnd
,
SW_SHOW
);
ShowWindow
(
This
->
w
indow
.
hwnd
,
SW_SHOW
);
SetEvent
(
This
->
run_event
);
}
...
...
@@ -509,7 +509,7 @@ static HRESULT vmr_connect(struct strmbase_renderer *iface, const AM_MEDIA_TYPE
{
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
const
BITMAPINFOHEADER
*
bitmap_header
=
get_bitmap_header
(
mt
);
HWND
window
=
filter
->
baseControlW
indow
.
hwnd
;
HWND
window
=
filter
->
w
indow
.
hwnd
;
HRESULT
hr
;
RECT
rect
;
...
...
@@ -567,7 +567,7 @@ static void vmr_destroy(struct strmbase_renderer *iface)
{
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
video_window_cleanup
(
&
filter
->
baseControlW
indow
);
video_window_cleanup
(
&
filter
->
w
indow
);
/* Devil May Cry 3 releases the IVMRSurfaceAllocatorNotify9 interface from
* TerminateDevice(). Artificially increase the reference count so that we
...
...
@@ -601,7 +601,7 @@ static HRESULT vmr_query_interface(struct strmbase_renderer *iface, REFIID iid,
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IVideoWindow
))
*
out
=
&
filter
->
baseControlW
indow
.
IVideoWindow_iface
;
*
out
=
&
filter
->
w
indow
.
IVideoWindow_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IBasicVideo
))
*
out
=
&
filter
->
baseControlVideo
.
IBasicVideo_iface
;
else
if
(
IsEqualGUID
(
iid
,
&
IID_IAMCertifiedOutputProtection
))
...
...
@@ -824,7 +824,7 @@ static HRESULT WINAPI VMR9_SetDefaultTargetRect(BaseControlVideo* This)
RECT
rect
;
struct
quartz_vmr
*
pVMR9
=
impl_from_BaseControlVideo
(
This
);
if
(
!
GetClientRect
(
pVMR9
->
baseControlW
indow
.
hwnd
,
&
rect
))
if
(
!
GetClientRect
(
pVMR9
->
w
indow
.
hwnd
,
&
rect
))
return
E_FAIL
;
SetRect
(
&
pVMR9
->
target_rect
,
0
,
0
,
rect
.
right
,
rect
.
bottom
);
...
...
@@ -1598,7 +1598,7 @@ static HRESULT WINAPI VMR7WindowlessControl_SetVideoPosition(IVMRWindowlessContr
{
This
->
target_rect
=
*
dest
;
FIXME
(
"Output rectangle: %s.
\n
"
,
wine_dbgstr_rect
(
dest
));
SetWindowPos
(
This
->
baseControlW
indow
.
hwnd
,
NULL
,
SetWindowPos
(
This
->
w
indow
.
hwnd
,
NULL
,
dest
->
left
,
dest
->
top
,
dest
->
right
-
dest
->
left
,
dest
->
bottom
-
dest
->
top
,
SWP_NOACTIVATE
|
SWP_NOCOPYBITS
|
SWP_NOOWNERZORDER
|
SWP_NOREDRAW
);
}
...
...
@@ -1799,7 +1799,7 @@ static HRESULT WINAPI VMR9WindowlessControl_SetVideoPosition(IVMRWindowlessContr
{
This
->
target_rect
=
*
dest
;
FIXME
(
"Output rectangle: %s.
\n
"
,
wine_dbgstr_rect
(
dest
));
SetWindowPos
(
This
->
baseControlW
indow
.
hwnd
,
NULL
,
SetWindowPos
(
This
->
w
indow
.
hwnd
,
NULL
,
dest
->
left
,
dest
->
top
,
dest
->
right
-
dest
->
left
,
dest
->
bottom
-
dest
->
top
,
SWP_NOACTIVATE
|
SWP_NOCOPYBITS
|
SWP_NOOWNERZORDER
|
SWP_NOREDRAW
);
}
...
...
@@ -1874,7 +1874,7 @@ static HRESULT WINAPI VMR9WindowlessControl_RepaintVideo(IVMRWindowlessControl9
FIXME
(
"(%p/%p)->(...) semi-stub
\n
"
,
iface
,
This
);
EnterCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
if
(
hwnd
!=
This
->
hWndClippingWindow
&&
hwnd
!=
This
->
baseControlW
indow
.
hwnd
)
if
(
hwnd
!=
This
->
hWndClippingWindow
&&
hwnd
!=
This
->
w
indow
.
hwnd
)
{
ERR
(
"Not handling changing windows yet!!!
\n
"
);
LeaveCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
...
...
@@ -1889,7 +1889,7 @@ static HRESULT WINAPI VMR9WindowlessControl_RepaintVideo(IVMRWindowlessControl9
}
/* Windowless extension */
hr
=
IDirect3DDevice9_Present
(
This
->
allocator_d3d9_dev
,
NULL
,
NULL
,
This
->
baseControlW
indow
.
hwnd
,
NULL
);
hr
=
IDirect3DDevice9_Present
(
This
->
allocator_d3d9_dev
,
NULL
,
NULL
,
This
->
w
indow
.
hwnd
,
NULL
);
LeaveCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
return
hr
;
...
...
@@ -2348,7 +2348,7 @@ static HRESULT WINAPI overlay_GetWindowHandle(IOverlay *iface, HWND *window)
TRACE
(
"filter %p, window %p.
\n
"
,
filter
,
window
);
*
window
=
filter
->
baseControlW
indow
.
hwnd
;
*
window
=
filter
->
w
indow
.
hwnd
;
return
S_OK
;
}
...
...
@@ -2423,12 +2423,12 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
object
->
IVMRWindowlessControl9_iface
.
lpVtbl
=
&
VMR9_WindowlessControl_Vtbl
;
object
->
IOverlay_iface
.
lpVtbl
=
&
overlay_vtbl
;
video_window_init
(
&
object
->
baseControlW
indow
,
&
IVideoWindow_VTable
,
video_window_init
(
&
object
->
w
indow
,
&
IVideoWindow_VTable
,
&
object
->
renderer
.
filter
,
&
object
->
renderer
.
sink
.
pin
,
&
window_ops
);
if
(
FAILED
(
hr
=
video_window_create_window
(
&
object
->
baseControlW
indow
)))
if
(
FAILED
(
hr
=
video_window_create_window
(
&
object
->
w
indow
)))
{
video_window_cleanup
(
&
object
->
baseControlW
indow
);
video_window_cleanup
(
&
object
->
w
indow
);
strmbase_renderer_cleanup
(
&
object
->
renderer
);
FreeLibrary
(
object
->
hD3d9
);
free
(
object
);
...
...
@@ -2621,7 +2621,7 @@ static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *ifac
BOOL
render
=
FALSE
;
TRACE
(
"(%p/%p/%p)->(...) stub
\n
"
,
iface
,
This
,
This
->
pVMR9
);
GetWindowRect
(
This
->
pVMR9
->
baseControlW
indow
.
hwnd
,
&
output
);
GetWindowRect
(
This
->
pVMR9
->
w
indow
.
hwnd
,
&
output
);
TRACE
(
"Output rectangle: %s
\n
"
,
wine_dbgstr_rect
(
&
output
));
/* This might happen if we don't have active focus (eg on a different virtual desktop) */
...
...
@@ -2646,7 +2646,7 @@ static HRESULT WINAPI VMR9_ImagePresenter_PresentImage(IVMRImagePresenter9 *ifac
hr
=
IDirect3DDevice9_EndScene
(
This
->
d3d9_dev
);
if
(
render
&&
SUCCEEDED
(
hr
))
{
hr
=
IDirect3DDevice9_Present
(
This
->
d3d9_dev
,
NULL
,
NULL
,
This
->
pVMR9
->
baseControlW
indow
.
hwnd
,
NULL
);
hr
=
IDirect3DDevice9_Present
(
This
->
d3d9_dev
,
NULL
,
NULL
,
This
->
pVMR9
->
w
indow
.
hwnd
,
NULL
);
if
(
FAILED
(
hr
))
FIXME
(
"Presenting image: %08x
\n
"
,
hr
);
}
...
...
@@ -2770,12 +2770,12 @@ static BOOL CreateRenderingWindow(struct default_presenter *This, VMR9Allocation
TRACE
(
"(%p)->()
\n
"
,
This
);
/* Obtain a monitor and d3d9 device */
d3d9_adapter
=
d3d9_adapter_from_hwnd
(
This
->
d3d9_ptr
,
This
->
pVMR9
->
baseControlW
indow
.
hwnd
,
&
This
->
hMon
);
d3d9_adapter
=
d3d9_adapter_from_hwnd
(
This
->
d3d9_ptr
,
This
->
pVMR9
->
w
indow
.
hwnd
,
&
This
->
hMon
);
/* Now try to create the d3d9 device */
ZeroMemory
(
&
d3dpp
,
sizeof
(
d3dpp
));
d3dpp
.
Windowed
=
TRUE
;
d3dpp
.
hDeviceWindow
=
This
->
pVMR9
->
baseControlW
indow
.
hwnd
;
d3dpp
.
hDeviceWindow
=
This
->
pVMR9
->
w
indow
.
hwnd
;
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
d3dpp
.
BackBufferHeight
=
This
->
pVMR9
->
target_rect
.
bottom
-
This
->
pVMR9
->
target_rect
.
top
;
d3dpp
.
BackBufferWidth
=
This
->
pVMR9
->
target_rect
.
right
-
This
->
pVMR9
->
target_rect
.
left
;
...
...
@@ -2874,19 +2874,19 @@ static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(struct default_presenter
/* Now try to create the d3d9 device */
ZeroMemory
(
&
d3dpp
,
sizeof
(
d3dpp
));
d3dpp
.
Windowed
=
TRUE
;
d3dpp
.
hDeviceWindow
=
This
->
pVMR9
->
baseControlW
indow
.
hwnd
;
d3dpp
.
hDeviceWindow
=
This
->
pVMR9
->
w
indow
.
hwnd
;
d3dpp
.
SwapEffect
=
D3DSWAPEFFECT_DISCARD
;
if
(
This
->
d3d9_dev
)
IDirect3DDevice9_Release
(
This
->
d3d9_dev
);
This
->
d3d9_dev
=
NULL
;
hr
=
IDirect3D9_CreateDevice
(
This
->
d3d9_ptr
,
d3d9_adapter_from_hwnd
(
This
->
d3d9_ptr
,
This
->
pVMR9
->
baseControlW
indow
.
hwnd
,
&
This
->
hMon
),
D3DDEVTYPE_HAL
,
NULL
,
This
->
pVMR9
->
w
indow
.
hwnd
,
&
This
->
hMon
),
D3DDEVTYPE_HAL
,
NULL
,
D3DCREATE_HARDWARE_VERTEXPROCESSING
,
&
d3dpp
,
&
This
->
d3d9_dev
);
if
(
FAILED
(
hr
))
{
hr
=
IDirect3D9_CreateDevice
(
This
->
d3d9_ptr
,
d3d9_adapter_from_hwnd
(
This
->
d3d9_ptr
,
This
->
pVMR9
->
baseControlW
indow
.
hwnd
,
&
This
->
hMon
),
D3DDEVTYPE_HAL
,
NULL
,
This
->
pVMR9
->
w
indow
.
hwnd
,
&
This
->
hMon
),
D3DDEVTYPE_HAL
,
NULL
,
D3DCREATE_MIXED_VERTEXPROCESSING
,
&
d3dpp
,
&
This
->
d3d9_dev
);
if
(
FAILED
(
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