No wrapper functions anymore for x11_get_video_size

This commit is contained in:
twinaphex 2015-11-19 10:29:26 +01:00
parent 9563f40aeb
commit b50152902a
4 changed files with 6 additions and 19 deletions

View File

@ -431,7 +431,7 @@ void x11_check_window(bool *quit)
*quit = g_x11_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) if (!g_x11_dpy || g_x11_win == None)
{ {

View File

@ -70,7 +70,7 @@ bool x11_get_metrics(void *data,
void x11_check_window(bool *quit); 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); bool x11_has_focus(void *data);

View File

@ -85,13 +85,6 @@ static int glx_nul_handler(Display *dpy, XErrorEvent *event)
return 0; 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) static void ctx_glx_destroy_resources(gfx_ctx_glx_data_t *glx)
{ {
driver_t *driver = driver_get_ptr(); 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; 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) 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_bind_api,
gfx_ctx_glx_swap_interval, gfx_ctx_glx_swap_interval,
gfx_ctx_glx_set_video_mode, 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_size */
NULL, /* get_video_output_prev */ NULL, /* get_video_output_prev */
NULL, /* get_video_output_next */ NULL, /* get_video_output_next */

View File

@ -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, static void gfx_ctx_xegl_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count) bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
{ {
unsigned new_width = *width; unsigned new_width = *width;
unsigned new_height = *height; 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) 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_bind_api,
gfx_ctx_xegl_swap_interval, gfx_ctx_xegl_swap_interval,
gfx_ctx_xegl_set_video_mode, 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_size */
NULL, /* get_video_output_prev */ NULL, /* get_video_output_prev */
NULL, /* get_video_output_next */ NULL, /* get_video_output_next */