diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 712dde6450..bcb2ddc614 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -49,8 +49,8 @@ #include "../../input/input_driver.h" #include "../../input/input_keymaps.h" #include "../../input/common/input_x11_common.h" -#include "../../verbosity.h" #include "../../configuration.h" +#include "../../verbosity.h" #define _NET_WM_STATE_ADD 1 #define MOVERESIZE_GRAVITY_CENTER 5 @@ -267,7 +267,7 @@ float x11_get_refresh_rate(void *data) return refresh; } -static bool get_video_mode(video_frame_info_t *video_info, +static bool get_video_mode( Display *dpy, unsigned width, unsigned height, XF86VidModeModeInfo *mode, XF86VidModeModeInfo *desktop_mode) { @@ -276,6 +276,9 @@ static bool get_video_mode(video_frame_info_t *video_info, float refresh_mod = 0.0f; float minimum_fps_diff = 0.0f; XF86VidModeModeInfo **modes = NULL; + settings_t *settings = config_get_ptr(); + bool black_frame_insertion = settings->bools.black_frame_insertion; + float video_refresh_rate = settings->floats.video_refresh_rate; XF86VidModeGetAllModeLines(dpy, DefaultScreen(dpy), &num_modes, &modes); @@ -289,7 +292,7 @@ static bool get_video_mode(video_frame_info_t *video_info, /* If we use black frame insertion, we fake a 60 Hz monitor * for 120 Hz one, etc, so try to match that. */ - refresh_mod = video_info->black_frame_insertion ? 0.5f : 1.0f; + refresh_mod = black_frame_insertion ? 0.5f : 1.0f; for (i = 0; i < num_modes; i++) { @@ -305,7 +308,7 @@ static bool get_video_mode(video_frame_info_t *video_info, continue; refresh = refresh_mod * m->dotclock * 1000.0f / (m->htotal * m->vtotal); - diff = fabsf(refresh - video_info->refresh_rate); + diff = fabsf(refresh - video_refresh_rate); if (!ret || diff < minimum_fps_diff) { @@ -319,13 +322,13 @@ static bool get_video_mode(video_frame_info_t *video_info, return ret; } -bool x11_enter_fullscreen(video_frame_info_t *video_info, +bool x11_enter_fullscreen( Display *dpy, unsigned width, unsigned height) { XF86VidModeModeInfo mode; - if (!get_video_mode(video_info, dpy, width, height, &mode, &desktop_mode)) + if (!get_video_mode(dpy, width, height, &mode, &desktop_mode)) return false; if (!XF86VidModeSwitchToMode(dpy, DefaultScreen(dpy), &mode)) diff --git a/gfx/common/x11_common.h b/gfx/common/x11_common.h index ffc205a36e..b391b530f6 100644 --- a/gfx/common/x11_common.h +++ b/gfx/common/x11_common.h @@ -31,9 +31,7 @@ extern unsigned g_x11_screen; void x11_show_mouse(Display *dpy, Window win, bool state); void x11_set_net_wm_fullscreen(Display *dpy, Window win); void x11_suspend_screensaver(Window win, bool enable); -bool x11_enter_fullscreen(video_frame_info_t *video_info, - Display *dpy, unsigned width, - unsigned height); +bool x11_enter_fullscreen(Display *dpy, unsigned width, unsigned height); void x11_exit_fullscreen(Display *dpy); void x11_move_window(Display *dpy, Window win, diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index de1a87dfaf..539a3b2078 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -306,7 +306,6 @@ static bool android_gfx_ctx_set_resize(void *data, } static bool android_gfx_ctx_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index feb018e67b..0caa46b226 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -105,7 +105,6 @@ static void gfx_ctx_cgl_swap_buffers(void *data) } static bool gfx_ctx_cgl_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 725e352baf..9ce3d3638a 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -689,7 +689,6 @@ static void *cocoagl_gfx_ctx_get_context_data(void *data) #endif static bool cocoagl_gfx_ctx_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { #if defined(HAVE_COCOA_METAL) diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index fc73a6cd4f..bf457b6cc3 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -697,7 +697,6 @@ error: #endif static bool gfx_ctx_drm_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -707,6 +706,9 @@ static bool gfx_ctx_drm_set_video_mode(void *data, struct drm_fb *fb = NULL; #endif gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data; + settings_t *settings = config_get_ptr(); + bool black_frame_insertion = settings->bools.black_frame_insertion; + float video_refresh_rate = settings->floats.video_refresh_rate; if (!drm) return false; @@ -717,7 +719,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, /* If we use black frame insertion, * we fake a 60 Hz monitor for 120 Hz one, * etc, so try to match that. */ - refresh_mod = video_info->black_frame_insertion + refresh_mod = black_frame_insertion ? 0.5f : 1.0f; /* Find desired video mode, and use that. @@ -743,7 +745,7 @@ static bool gfx_ctx_drm_set_video_mode(void *data, continue; diff = fabsf(refresh_mod * g_drm_connector->modes[i].vrefresh - - video_info->refresh_rate); + - video_refresh_rate); if (!g_drm_mode || diff < minimum_fps_diff) { diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 351a459bfe..1f66f99d1f 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -245,12 +245,9 @@ error: } static bool gfx_ctx_emscripten_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { - (void)data; - if (g_egl_inited) return false; diff --git a/gfx/drivers_context/fpga_ctx.c b/gfx/drivers_context/fpga_ctx.c index 1d7f4e57e6..97047a4d1b 100644 --- a/gfx/drivers_context/fpga_ctx.c +++ b/gfx/drivers_context/fpga_ctx.c @@ -81,7 +81,6 @@ static void gfx_ctx_fpga_destroy(void *data) } static bool gfx_ctx_fpga_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/gdi_ctx.c b/gfx/drivers_context/gdi_ctx.c index 65bf9f0717..58dddbc832 100644 --- a/gfx/drivers_context/gdi_ctx.c +++ b/gfx/drivers_context/gdi_ctx.c @@ -166,7 +166,6 @@ static void gfx_ctx_gdi_destroy(void *data) } static bool gfx_ctx_gdi_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index d461eb3845..33571bb783 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -47,7 +47,6 @@ static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *h } static bool gfx_ctx_null_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index b4b81a9f77..0186c7921b 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -121,12 +121,13 @@ static bool gfx_ctx_khr_display_set_resize(void *data, } static bool gfx_ctx_khr_display_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { struct vulkan_display_surface_info info; - khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; + khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; + settings_t *settings = config_get_ptr(); + unsigned video_monitor_index = settings->uints.video_monitor_index; if (!fullscreen) { @@ -136,7 +137,7 @@ static bool gfx_ctx_khr_display_set_video_mode(void *data, info.width = width; info.height = height; - info.monitor_index = video_info->monitor_index; + info.monitor_index = video_monitor_index; if (!vulkan_surface_create(&khr->vk, VULKAN_WSI_DISPLAY, &info, NULL, 0, 0, khr->swap_interval)) diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 0823653229..e3da766108 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -151,7 +151,6 @@ static void gfx_ctx_mali_fbdev_check_window(void *data, bool *quit, } static bool gfx_ctx_mali_fbdev_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/network_ctx.c b/gfx/drivers_context/network_ctx.c index a4a50d5626..cc7c846fd3 100644 --- a/gfx/drivers_context/network_ctx.c +++ b/gfx/drivers_context/network_ctx.c @@ -68,7 +68,6 @@ static void gfx_ctx_network_destroy(void *data) } static bool gfx_ctx_network_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index 0e20837031..73ba46ea96 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -133,7 +133,6 @@ static void gfx_ctx_opendingux_check_window(void *data, bool *quit, } static bool gfx_ctx_opendingux_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/orbis_ctx.c b/gfx/drivers_context/orbis_ctx.c index 5c7ba0d0f0..77aeb1ee2c 100644 --- a/gfx/drivers_context/orbis_ctx.c +++ b/gfx/drivers_context/orbis_ctx.c @@ -141,9 +141,8 @@ static void orbis_ctx_check_window(void *data, bool *quit, } static bool orbis_ctx_set_video_mode(void *data, - video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) + unsigned width, unsigned height, + bool fullscreen) { /* Create an EGL rendering context */ static const EGLint contextAttributeList[] = diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index 365eeacc05..353bc0f5b2 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -247,7 +247,6 @@ static void osmesa_ctx_swap_interval(void *data, int interval) } static bool osmesa_ctx_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 54c4d2345f..ecf2490553 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -272,7 +272,6 @@ static void *gfx_ctx_ps3_init(video_frame_info_t *video_info, void *video_driver } static bool gfx_ctx_ps3_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index 805853eb50..d90adb0e22 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -298,7 +298,6 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit, } static bool gfx_ctx_qnx_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 085de4627e..f22ab6370f 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -172,21 +172,23 @@ static void sdl_ctx_swap_interval(void *data, int interval) } static bool sdl_ctx_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { unsigned fsflag = 0; gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; + settings_t *settings = config_get_ptr(); + bool windowed_fullscreen= settings->bools.video_windowed_fullscreen; + unsigned video_monitor_index = settings->uints.video_monitor_index; - sdl->g_new_width = width; - sdl->g_new_height = height; + sdl->g_new_width = width; + sdl->g_new_height = height; #ifdef HAVE_SDL2 if (fullscreen) { - if (video_info->windowed_fullscreen) + if (windowed_fullscreen) fsflag = SDL_WINDOW_FULLSCREEN_DESKTOP; else fsflag = SDL_WINDOW_FULLSCREEN; @@ -201,7 +203,7 @@ static bool sdl_ctx_set_video_mode(void *data, } else { - unsigned display = video_info->monitor_index; + unsigned display = video_monitor_index; sdl->g_win = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), diff --git a/gfx/drivers_context/sixel_ctx.c b/gfx/drivers_context/sixel_ctx.c index 074e9b16cd..a81e57aa14 100644 --- a/gfx/drivers_context/sixel_ctx.c +++ b/gfx/drivers_context/sixel_ctx.c @@ -68,7 +68,6 @@ static void gfx_ctx_sixel_destroy(void *data) } static bool gfx_ctx_sixel_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/switch_ctx.c b/gfx/drivers_context/switch_ctx.c index 3101dd1926..c9f629a44b 100644 --- a/gfx/drivers_context/switch_ctx.c +++ b/gfx/drivers_context/switch_ctx.c @@ -148,9 +148,8 @@ static void switch_ctx_check_window(void *data, bool *quit, } static bool switch_ctx_set_video_mode(void *data, - video_frame_info_t *video_info, - unsigned width, unsigned height, - bool fullscreen) + unsigned width, unsigned height, + bool fullscreen) { /* Create an EGL rendering context */ static const EGLint contextAttributeList[] = diff --git a/gfx/drivers_context/uwp_egl_ctx.c b/gfx/drivers_context/uwp_egl_ctx.c index 32d2a8e66b..f80f2f2466 100644 --- a/gfx/drivers_context/uwp_egl_ctx.c +++ b/gfx/drivers_context/uwp_egl_ctx.c @@ -223,7 +223,6 @@ static void gfx_ctx_uwp_destroy(void *data) } static bool gfx_ctx_uwp_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index a66f9b25ff..0149b170e5 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -336,7 +336,6 @@ static void gfx_ctx_vc_set_swap_interval(void *data, int swap_interval) } static bool gfx_ctx_vc_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/vita_ctx.c b/gfx/drivers_context/vita_ctx.c index 3af77e3564..7aaa54b177 100644 --- a/gfx/drivers_context/vita_ctx.c +++ b/gfx/drivers_context/vita_ctx.c @@ -56,7 +56,6 @@ static void vita_swap_buffers(void *data) } static bool vita_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index 8625ac1f93..cc31af9ecb 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -138,7 +138,6 @@ static void gfx_ctx_vivante_check_window(void *data, bool *quit, } static bool gfx_ctx_vivante_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index 2e9d33e06b..ee55074b29 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -1540,7 +1540,6 @@ static void gfx_ctx_wl_set_swap_interval(void *data, int swap_interval) } static bool gfx_ctx_wl_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c index affcbfda5c..3d2e841b57 100644 --- a/gfx/drivers_context/wgl_ctx.c +++ b/gfx/drivers_context/wgl_ctx.c @@ -764,7 +764,6 @@ static void gfx_ctx_wgl_destroy(void *data) } static bool gfx_ctx_wgl_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 41cd07eb87..00a5b4f1d8 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -609,13 +609,11 @@ error: } static bool gfx_ctx_x_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { XEvent event; bool true_full = false; - bool windowed_full = false; int val = 0; int x_off = 0; int y_off = 0; @@ -631,14 +629,14 @@ static bool gfx_ctx_x_set_video_mode(void *data, * ((unsigned)-1 / 100.0); bool disable_composition = settings->bools.video_disable_composition; bool show_decorations = settings->bools.video_window_show_decorations; + bool windowed_full = settings->bools.video_windowed_fullscreen; + unsigned video_monitor_index = settings->uints.video_monitor_index; frontend_driver_install_signal_handler(); if (!x) return false; - windowed_full = video_info->windowed_fullscreen; - true_full = false; switch (x_api) { @@ -676,7 +674,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, if (fullscreen && !windowed_full) { - if (x11_enter_fullscreen(video_info, g_x11_dpy, width, height)) + if (x11_enter_fullscreen(g_x11_dpy, width, height)) { x->g_should_reset_mode = true; true_full = true; @@ -700,8 +698,8 @@ static bool gfx_ctx_x_set_video_mode(void *data, if (!x11_has_net_wm_fullscreen(g_x11_dpy) && true_full) swa.override_redirect = True; - if (video_info->monitor_index) - g_x11_screen = video_info->monitor_index - 1; + if (video_monitor_index) + g_x11_screen = video_monitor_index - 1; #ifdef HAVE_XINERAMA if (fullscreen || g_x11_screen != 0) diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 8a40cf8300..b76f07d6a8 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -262,7 +262,6 @@ static EGLint *xegl_fill_attribs(xegl_ctx_data_t *xegl, EGLint *attr) static void gfx_ctx_xegl_set_swap_interval(void *data, int swap_interval); static bool gfx_ctx_xegl_set_video_mode(void *data, - video_frame_info_t *video_info, unsigned width, unsigned height, bool fullscreen) { @@ -279,7 +278,9 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, char *wm_name = NULL; xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data; settings_t *settings = config_get_ptr(); - bool video_disable_composition = settings ? settings->bools.video_disable_composition : false; + bool video_disable_composition = settings->bools.video_disable_composition; + bool windowed_full = settings->bools.video_windowed_fullscreen; + unsigned video_monitor_index = settings->uints.video_monitor_index; int (*old_handler)(Display*, XErrorEvent*) = NULL; @@ -306,9 +307,9 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, ButtonPressMask | ButtonReleaseMask | KeyReleaseMask; swa.override_redirect = False; - if (fullscreen && !video_info->windowed_fullscreen) + if (fullscreen && !windowed_fullscreen) { - if (x11_enter_fullscreen(video_info, g_x11_dpy, width, height)) + if (x11_enter_fullscreen(g_x11_dpy, width, height)) { xegl->should_reset_mode = true; true_full = true; @@ -332,8 +333,8 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, if (!x11_has_net_wm_fullscreen(g_x11_dpy) && true_full) swa.override_redirect = True; - if (video_info->monitor_index) - g_x11_screen = video_info->monitor_index - 1; + if (video_monitor_index) + g_x11_screen = video_monitor_index - 1; #ifdef HAVE_XINERAMA if (fullscreen || g_x11_screen != 0) diff --git a/retroarch.c b/retroarch.c index 3da02c4beb..2322439040 100644 --- a/retroarch.c +++ b/retroarch.c @@ -24341,15 +24341,10 @@ bool video_context_driver_get_ident(gfx_ctx_ident_t *ident) bool video_context_driver_set_video_mode(gfx_ctx_mode_t *mode_info) { - video_frame_info_t video_info; - if (!current_video_context.set_video_mode) return false; - - video_driver_build_info(&video_info); - return current_video_context.set_video_mode( - video_context_data, &video_info, mode_info->width, + video_context_data, mode_info->width, mode_info->height, mode_info->fullscreen); } diff --git a/retroarch.h b/retroarch.h index c50450b804..044f83a4a6 100644 --- a/retroarch.h +++ b/retroarch.h @@ -1222,7 +1222,7 @@ typedef struct gfx_ctx_driver void (*swap_interval)(void *data, int); /* Sets video mode. Creates a window, etc. */ - bool (*set_video_mode)(void*, video_frame_info_t *video_info, unsigned, unsigned, bool); + bool (*set_video_mode)(void*, unsigned, unsigned, bool); /* Gets current window size. * If not initialized yet, it returns current screen size. */