Implement get_video_size for DRM Go2

This commit is contained in:
libretroadmin 2022-11-22 17:09:25 +01:00
parent ce1e59615a
commit 623b925256

View File

@ -267,6 +267,18 @@ static bool gfx_ctx_go2_drm_set_video_mode(void *data,
return true;
}
static void gfx_ctx_go2_drm_get_video_size(void *data,
unsigned *width, unsigned *height)
{
gfx_ctx_go2_drm_data_t drm = (gfx_ctx_go2_drm_data_t)data;
if (!drm)
return;
*width = drm->fb_width;
*height = drm->fb_height;
}
static void gfx_ctx_go2_drm_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height)
{
@ -388,7 +400,7 @@ const gfx_ctx_driver_t gfx_ctx_go2_drm = {
gfx_ctx_go2_drm_bind_api,
gfx_ctx_go2_drm_swap_interval,
gfx_ctx_go2_drm_set_video_mode,
NULL, /* get_video_size */
gfx_ctx_go2_drm_get_video_size,
drm_get_refresh_rate,
NULL, /* get_video_output_size */
NULL, /* get_video_output_prev */