diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index af37ee0b40..b215ff578b 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -2256,7 +2256,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo win_height = gl->full_y; } - if (!ctx_driver->set_video_mode(gl, win_width, win_height, video->fullscreen)) + if (!gfx_ctx_set_video_mode(gl, win_width, win_height, video->fullscreen)) goto error; /* Clear out potential error flags in case we use cached context. */ diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index 894c2de784..a63cf08d2f 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -117,7 +117,7 @@ static void *vg_init(const video_info_t *video, const input_driver_t **input, vo win_height = vg->mScreenHeight; } - if (!ctx->set_video_mode(vg, win_width, win_height, video->fullscreen)) + if (!gfx_ctx_set_video_mode(vg, win_width, win_height, video->fullscreen)) goto error; gfx_ctx_get_video_size(vg, &vg->mScreenWidth, &vg->mScreenHeight); diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index aa3a26e38e..6d87da5a36 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -116,14 +116,15 @@ bool gfx_ctx_focus(void *data) return false; } -void gfx_ctx_set_video_mode(void *data, +bool gfx_ctx_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen) { const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr(); if (ctx && ctx->set_video_mode) - ctx->set_video_mode(data, width, height, fullscreen); + return ctx->set_video_mode(data, width, height, fullscreen); + return false; } void gfx_ctx_translate_aspect(void *data, float *aspect, diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 651b9c3e8f..58600e5e81 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -205,7 +205,7 @@ bool gfx_ctx_get_metrics(enum display_metric_types type, float *value); void gfx_ctx_translate_aspect(void *data, float *aspect, unsigned width, unsigned height); -void gfx_ctx_set_video_mode(void *data, +bool gfx_ctx_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen);