From 623b9252561a2f97be2d8123f3f3c5ba6d172b86 Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Tue, 22 Nov 2022 17:09:25 +0100 Subject: [PATCH] Implement get_video_size for DRM Go2 --- gfx/drivers_context/drm_go2_ctx.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_context/drm_go2_ctx.c b/gfx/drivers_context/drm_go2_ctx.c index 71d319bb43..3ca8d7a80c 100644 --- a/gfx/drivers_context/drm_go2_ctx.c +++ b/gfx/drivers_context/drm_go2_ctx.c @@ -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 */