Add to video_frame_info

This commit is contained in:
twinaphex 2017-04-29 16:07:02 +02:00
parent c678d97270
commit 2322e77795
3 changed files with 17 additions and 6 deletions

View File

@ -337,13 +337,11 @@ void gl_set_viewport(void *data, video_frame_info_t *video_info,
#if defined(HAVE_MENU)
if (video_info->aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
{
const struct video_viewport *custom = video_viewport_get_custom();
/* GL has bottom-left origin viewport. */
x = custom->x;
y = height - custom->y - custom->height;
viewport_width = custom->width;
viewport_height = custom->height;
x = video_info->custom_vp_x;
y = height - video_info->custom_vp_y - video_info->custom_vp_height;
viewport_width = video_info->custom_vp_width;
viewport_height = video_info->custom_vp_height;
}
else
#endif

View File

@ -2255,6 +2255,12 @@ void video_driver_build_info(video_frame_info_t *video_info)
video_info->font_msg_color_r = settings->floats.video_msg_color_r;
video_info->font_msg_color_g = settings->floats.video_msg_color_g;
video_info->font_msg_color_b = settings->floats.video_msg_color_b;
video_info->custom_vp_x = video_viewport_custom.x;
video_info->custom_vp_y = video_viewport_custom.y;
video_info->custom_vp_width = video_viewport_custom.width;
video_info->custom_vp_height = video_viewport_custom.height;
video_info->custom_vp_full_width = video_viewport_custom.full_width;
video_info->custom_vp_full_height = video_viewport_custom.full_height;
video_info->fps_text[0] = '\0';

View File

@ -159,6 +159,13 @@ typedef struct video_frame_info
bool is_perfcnt_enable;
bool menu_is_alive;
int custom_vp_x;
int custom_vp_y;
unsigned custom_vp_width;
unsigned custom_vp_height;
unsigned custom_vp_full_width;
unsigned custom_vp_full_height;
} video_frame_info_t;
/* Optionally implemented interface to poke more