Skip to content

Commit 7866687

Browse files
committed
Invert custom viewport y position when suitable
1 parent a17bf5e commit 7866687

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

gfx/video_driver.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2141,6 +2141,9 @@ void video_viewport_get_scaled_aspect2(struct video_viewport *vp,
21412141
x = custom_vp->x;
21422142
y = custom_vp->y;
21432143

2144+
if (!y_down)
2145+
y = -y;
2146+
21442147
padding_x = vp_width - custom_vp->width;
21452148
padding_y = vp_height - custom_vp->height;
21462149

@@ -2476,6 +2479,9 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
24762479
x = custom_vp->x;
24772480
y = custom_vp->y;
24782481

2482+
if (!y_down)
2483+
y = -y;
2484+
24792485
padding_x = width - custom_vp->width;
24802486
padding_y = height - custom_vp->height;
24812487

0 commit comments

Comments
 (0)