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
20b1ef6e
Commit
20b1ef6e
authored
Dec 05, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Dec 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Return the rect from get_default_rect() through a pointer.
Notably, this avoids the incorrect use of a static variable.
parent
bc1ba439
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
16 deletions
+10
-16
quartz_private.h
dlls/quartz/quartz_private.h
+1
-1
videorenderer.c
dlls/quartz/videorenderer.c
+3
-6
vmr9.c
dlls/quartz/vmr9.c
+4
-7
window.c
dlls/quartz/window.c
+2
-2
No files found.
dlls/quartz/quartz_private.h
View file @
20b1ef6e
...
...
@@ -108,7 +108,7 @@ struct video_window
struct
video_window_ops
{
RECT
(
*
get_default_rect
)(
struct
video_window
*
window
);
void
(
*
get_default_rect
)(
struct
video_window
*
window
,
RECT
*
rect
);
HRESULT
(
*
get_current_image
)(
struct
video_window
*
window
,
LONG
*
size
,
LONG
*
image
);
};
...
...
dlls/quartz/videorenderer.c
View file @
20b1ef6e
...
...
@@ -199,14 +199,11 @@ static HRESULT video_renderer_connect(struct strmbase_renderer *iface, const AM_
return
S_OK
;
}
static
RECT
video_renderer_get_default_rect
(
struct
video_window
*
iface
)
static
void
video_renderer_get_default_rect
(
struct
video_window
*
iface
,
RECT
*
rect
)
{
struct
video_renderer
*
This
=
impl_from_video_window
(
iface
);
static
RECT
defRect
;
SetRect
(
&
defRect
,
0
,
0
,
This
->
VideoWidth
,
This
->
VideoHeight
);
struct
video_renderer
*
filter
=
impl_from_video_window
(
iface
);
return
defRect
;
SetRect
(
rect
,
0
,
0
,
filter
->
VideoWidth
,
filter
->
VideoHeight
)
;
}
static
const
struct
strmbase_renderer_ops
renderer_ops
=
...
...
dlls/quartz/vmr9.c
View file @
20b1ef6e
...
...
@@ -642,15 +642,12 @@ static const struct strmbase_renderer_ops renderer_ops =
.
renderer_pin_query_interface
=
vmr_pin_query_interface
,
};
static
RECT
vmr_get_default_rect
(
struct
video_window
*
This
)
static
void
vmr_get_default_rect
(
struct
video_window
*
iface
,
RECT
*
rect
)
{
struct
quartz_vmr
*
pVMR9
=
impl_from_video_window
(
This
);
const
BITMAPINFOHEADER
*
bmiheader
=
get_filter_bitmap_header
(
pVMR9
);
static
RECT
defRect
;
SetRect
(
&
defRect
,
0
,
0
,
bmiheader
->
biWidth
,
bmiheader
->
biHeight
);
struct
quartz_vmr
*
filter
=
impl_from_video_window
(
iface
);
const
BITMAPINFOHEADER
*
bitmap_header
=
get_filter_bitmap_header
(
filter
);
return
defRect
;
SetRect
(
rect
,
0
,
0
,
bitmap_header
->
biWidth
,
bitmap_header
->
biHeight
)
;
}
static
HRESULT
vmr_get_current_image
(
struct
video_window
*
iface
,
LONG
*
size
,
LONG
*
image
)
...
...
dlls/quartz/window.c
View file @
20b1ef6e
...
...
@@ -655,7 +655,7 @@ HRESULT WINAPI BaseControlWindowImpl_GetMinIdealImageSize(IVideoWindow *iface, L
TRACE
(
"window %p, width %p, height %p.
\n
"
,
window
,
width
,
height
);
rect
=
window
->
ops
->
get_default_rect
(
window
);
window
->
ops
->
get_default_rect
(
window
,
&
rect
);
*
width
=
rect
.
right
-
rect
.
left
;
*
height
=
rect
.
bottom
-
rect
.
top
;
return
S_OK
;
...
...
@@ -668,7 +668,7 @@ HRESULT WINAPI BaseControlWindowImpl_GetMaxIdealImageSize(IVideoWindow *iface, L
TRACE
(
"window %p, width %p, height %p.
\n
"
,
window
,
width
,
height
);
rect
=
window
->
ops
->
get_default_rect
(
window
);
window
->
ops
->
get_default_rect
(
window
,
&
rect
);
*
width
=
rect
.
right
-
rect
.
left
;
*
height
=
rect
.
bottom
-
rect
.
top
;
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