diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 5e2510b945..a5fedddc10 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -431,7 +431,7 @@ void x11_check_window(bool *quit) *quit = g_x11_quit; } -void x11_get_video_size(unsigned *width, unsigned *height) +void x11_get_video_size(void *data, unsigned *width, unsigned *height) { if (!g_x11_dpy || g_x11_win == None) { diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index 49825288e4..b846908288 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -70,7 +70,7 @@ bool x11_get_metrics(void *data, void x11_check_window(bool *quit); -void x11_get_video_size(unsigned *width, unsigned *height); +void x11_get_video_size(void *data, unsigned *width, unsigned *height); bool x11_has_focus(void *data); diff --git a/gfx/drivers_context/glx_ctx.c b/gfx/drivers_context/glx_ctx.c index 73171c186b..afcb9ae6e4 100644 --- a/gfx/drivers_context/glx_ctx.c +++ b/gfx/drivers_context/glx_ctx.c @@ -85,13 +85,6 @@ static int glx_nul_handler(Display *dpy, XErrorEvent *event) return 0; } - -static void gfx_ctx_glx_get_video_size(void *data, - unsigned *width, unsigned *height) -{ - x11_get_video_size(width, height); -} - static void ctx_glx_destroy_resources(gfx_ctx_glx_data_t *glx) { driver_t *driver = driver_get_ptr(); @@ -218,7 +211,7 @@ static void gfx_ctx_glx_check_window(void *data, bool *quit, { unsigned new_width = *width, new_height = *height; - gfx_ctx_glx_get_video_size(data, &new_width, &new_height); + x11_get_video_size(data, &new_width, &new_height); if (new_width != *width || new_height != *height) { @@ -690,7 +683,7 @@ const gfx_ctx_driver_t gfx_ctx_glx = { gfx_ctx_glx_bind_api, gfx_ctx_glx_swap_interval, gfx_ctx_glx_set_video_mode, - gfx_ctx_glx_get_video_size, + x11_get_video_size, NULL, /* get_video_output_size */ NULL, /* get_video_output_prev */ NULL, /* get_video_output_next */ diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 8e84ab2171..c1d4e41bbe 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -125,19 +125,13 @@ static void gfx_ctx_xegl_swap_interval(void *data, unsigned interval) } } -static void gfx_ctx_xegl_get_video_size(void *data, - unsigned *width, unsigned *height) -{ - x11_get_video_size(width, height); -} - static void gfx_ctx_xegl_check_window(void *data, bool *quit, bool *resize, unsigned *width, unsigned *height, unsigned frame_count) { unsigned new_width = *width; unsigned new_height = *height; - gfx_ctx_xegl_get_video_size(data, &new_width, &new_height); + x11_get_video_size(data, &new_width, &new_height); if (new_width != *width || new_height != *height) { @@ -726,7 +720,7 @@ const gfx_ctx_driver_t gfx_ctx_x_egl = gfx_ctx_xegl_bind_api, gfx_ctx_xegl_swap_interval, gfx_ctx_xegl_set_video_mode, - gfx_ctx_xegl_get_video_size, + x11_get_video_size, NULL, /* get_video_output_size */ NULL, /* get_video_output_prev */ NULL, /* get_video_output_next */