Go through gfx_ctx_set_video_mode

This commit is contained in:
twinaphex 2015-04-10 09:05:07 +02:00
parent 8082f17e2e
commit 0ef148f460
4 changed files with 6 additions and 5 deletions

View File

@ -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. */

View File

@ -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);

View File

@ -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,

View File

@ -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);