diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 8915ea5270..e4b4bdd57f 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -329,15 +329,6 @@ static void android_gfx_ctx_set_swap_interval(void *data, int swap_interval) #endif } -static gfx_ctx_proc_t android_gfx_ctx_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} - static void android_gfx_ctx_bind_hw_render(void *data, bool enable) { android_ctx_data_t *and = (android_ctx_data_t*)data; @@ -381,7 +372,11 @@ const gfx_ctx_driver_t gfx_ctx_android = { false, /* has_windowed */ android_gfx_ctx_swap_buffers, android_gfx_ctx_input_driver, - android_gfx_ctx_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index d70c17aae6..ad65db7b44 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -822,15 +822,6 @@ static bool gfx_ctx_drm_bind_api(void *video_driver, return false; } -static gfx_ctx_proc_t gfx_ctx_drm_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} - static void gfx_ctx_drm_bind_hw_render(void *data, bool enable) { gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data; @@ -891,7 +882,11 @@ const gfx_ctx_driver_t gfx_ctx_drm = { false, /* has_windowed */ gfx_ctx_drm_swap_buffers, gfx_ctx_drm_input_driver, - gfx_ctx_drm_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/drm_go2_ctx.c b/gfx/drivers_context/drm_go2_ctx.c index 2504489a3d..36d0c78644 100644 --- a/gfx/drivers_context/drm_go2_ctx.c +++ b/gfx/drivers_context/drm_go2_ctx.c @@ -110,15 +110,6 @@ static void gfx_ctx_go2_drm_input_driver(void *data, *input_data = NULL; } -static gfx_ctx_proc_t gfx_ctx_go2_drm_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} - static void *gfx_ctx_go2_drm_init(void *video_driver) { gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*) @@ -399,7 +390,11 @@ const gfx_ctx_driver_t gfx_ctx_go2_drm = { false, /* has_windowed */ gfx_ctx_go2_drm_swap_buffers, gfx_ctx_go2_drm_input_driver, - gfx_ctx_go2_drm_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index d68737b12d..853a065607 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -291,15 +291,6 @@ static bool gfx_ctx_emscripten_write_egl_image(void *data, const void *frame, unsigned width, unsigned height, unsigned pitch, bool rgb32, unsigned index, void **image_handle) { return false; } -static gfx_ctx_proc_t gfx_ctx_emscripten_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} - static void gfx_ctx_emscripten_bind_hw_render(void *data, bool enable) { emscripten_ctx_data_t *emscripten = (emscripten_ctx_data_t*)data; @@ -340,7 +331,11 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { false, gfx_ctx_emscripten_swap_buffers, gfx_ctx_emscripten_input_driver, - gfx_ctx_emscripten_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif gfx_ctx_emscripten_init_egl_image_buffer, gfx_ctx_emscripten_write_egl_image, NULL, diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 66b365bd17..415068da27 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -254,13 +254,6 @@ static void gfx_ctx_mali_fbdev_swap_buffers(void *data) #endif } -static gfx_ctx_proc_t gfx_ctx_mali_fbdev_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#endif -} - static void gfx_ctx_mali_fbdev_bind_hw_render(void *data, bool enable) { mali_ctx_data_t *mali = (mali_ctx_data_t*)data; @@ -313,7 +306,11 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { false, /* has_windowed */ gfx_ctx_mali_fbdev_swap_buffers, gfx_ctx_mali_fbdev_input_driver, - gfx_ctx_mali_fbdev_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index 3ca81f2bd5..fdb9e5257b 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -214,13 +214,6 @@ static void gfx_ctx_opendingux_set_swap_interval( #endif } -#ifdef HAVE_EGL -static gfx_ctx_proc_t gfx_ctx_opendingux_get_proc_address(const char *symbol) -{ - return egl_get_proc_address(symbol); -} -#endif - static void gfx_ctx_opendingux_bind_hw_render(void *data, bool enable) { opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; @@ -262,7 +255,7 @@ const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev = { gfx_ctx_opendingux_swap_buffers, gfx_ctx_opendingux_input_driver, #ifdef HAVE_EGL - gfx_ctx_opendingux_get_proc_address, + egl_get_proc_address, #else NULL, #endif diff --git a/gfx/drivers_context/orbis_ctx.c b/gfx/drivers_context/orbis_ctx.c index 61f6179f15..0656049cf5 100644 --- a/gfx/drivers_context/orbis_ctx.c +++ b/gfx/drivers_context/orbis_ctx.c @@ -235,13 +235,6 @@ static void orbis_ctx_swap_buffers(void *data) #endif } -static gfx_ctx_proc_t orbis_ctx_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#endif -} - static void orbis_ctx_bind_hw_render(void *data, bool enable) { orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; @@ -300,7 +293,11 @@ const gfx_ctx_driver_t orbis_ctx = { false, /* has_windowed */ orbis_ctx_swap_buffers, orbis_ctx_input_driver, - orbis_ctx_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index dc6834f239..f4ba0d7cf0 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -407,13 +407,6 @@ static void gfx_ctx_qnx_bind_hw_render(void *data, bool enable) #endif } -static gfx_ctx_proc_t gfx_ctx_qnx_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#endif -} - static uint32_t gfx_ctx_qnx_get_flags(void *data) { uint32_t flags = 0; @@ -447,7 +440,11 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { false, /* has_windowed */ gfx_ctx_qnx_swap_buffers, gfx_ctx_qnx_input_driver, - gfx_ctx_qnx_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/switch_ctx.c b/gfx/drivers_context/switch_ctx.c index 160be38ea6..4633c864ac 100644 --- a/gfx/drivers_context/switch_ctx.c +++ b/gfx/drivers_context/switch_ctx.c @@ -231,13 +231,6 @@ static void switch_ctx_swap_buffers(void *data) #endif } -static gfx_ctx_proc_t switch_ctx_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#endif -} - static void switch_ctx_bind_hw_render(void *data, bool enable) { switch_ctx_data_t *ctx_nx = (switch_ctx_data_t *)data; @@ -348,7 +341,11 @@ const gfx_ctx_driver_t switch_ctx = { false, /* has_windowed */ switch_ctx_swap_buffers, switch_ctx_input_driver, - switch_ctx_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index c11f79c63a..5ea4070472 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -670,15 +670,6 @@ static void gfx_ctx_vc_bind_hw_render(void *data, bool enable) #endif } -static gfx_ctx_proc_t gfx_ctx_vc_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} - static uint32_t gfx_ctx_vc_get_flags(void *data) { uint32_t flags = 0; @@ -711,7 +702,11 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { false, /* has_windowed */ gfx_ctx_vc_swap_buffers, gfx_ctx_vc_input_driver, - gfx_ctx_vc_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif gfx_ctx_vc_image_buffer_init, gfx_ctx_vc_image_buffer_write, NULL, diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index d298110fa4..16911fa554 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -219,15 +219,6 @@ static void gfx_ctx_vivante_swap_buffers(void *data) #endif } -static gfx_ctx_proc_t gfx_ctx_vivante_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} - static void gfx_ctx_vivante_bind_hw_render(void *data, bool enable) { vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; @@ -268,7 +259,11 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { false, /* has_windowed */ gfx_ctx_vivante_swap_buffers, gfx_ctx_vivante_input_driver, - gfx_ctx_vivante_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index bc81edebbd..2b66963820 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -843,15 +843,6 @@ static void gfx_ctx_wl_swap_buffers(void *data) #endif } -static gfx_ctx_proc_t gfx_ctx_wl_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} - static void gfx_ctx_wl_bind_hw_render(void *data, bool enable) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; @@ -923,7 +914,11 @@ const gfx_ctx_driver_t gfx_ctx_wayland = { true, /* has_windowed */ gfx_ctx_wl_swap_buffers, gfx_ctx_wl_input_driver, - gfx_ctx_wl_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, gfx_ctx_wl_show_mouse, diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c index fa3f85c57f..277e340ffd 100644 --- a/gfx/drivers_context/wgl_ctx.c +++ b/gfx/drivers_context/wgl_ctx.c @@ -517,11 +517,14 @@ static void gfx_ctx_wgl_update_title(void *data) static void gfx_ctx_wgl_get_video_size(void *data, unsigned *width, unsigned *height) { - HWND window = win32_get_window(); + HWND window = win32_get_window(); - (void)data; - - if (!window) + if (window) + { + *width = g_win32_resize_width; + *height = g_win32_resize_height; + } + else { RECT mon_rect; MONITORINFOEX current_mon; @@ -529,14 +532,9 @@ static void gfx_ctx_wgl_get_video_size(void *data, HMONITOR hm_to_use = NULL; win32_monitor_info(¤t_mon, &hm_to_use, &mon_id); - mon_rect = current_mon.rcMonitor; - *width = mon_rect.right - mon_rect.left; - *height = mon_rect.bottom - mon_rect.top; - } - else - { - *width = g_win32_resize_width; - *height = g_win32_resize_height; + mon_rect = current_mon.rcMonitor; + *width = mon_rect.right - mon_rect.left; + *height = mon_rect.bottom - mon_rect.top; } } @@ -837,13 +835,8 @@ static void gfx_ctx_wgl_get_video_output_size(void *data, win32_get_video_output_size(width, height); } -static void gfx_ctx_wgl_get_video_output_prev(void *data) -{ -} - -static void gfx_ctx_wgl_get_video_output_next(void *data) -{ -} +static void gfx_ctx_wgl_get_video_output_prev(void *data) { } +static void gfx_ctx_wgl_get_video_output_next(void *data) { } const gfx_ctx_driver_t gfx_ctx_wgl = { gfx_ctx_wgl_init,