diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 7c86ea963f..fb342697de 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -1876,7 +1876,6 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo const char *version = NULL; struct retro_hw_render_callback *hwr = NULL; char *error_string = NULL; - settings_t *settings = config_get_ptr(); gl_t *gl = (gl_t*)calloc(1, sizeof(gl_t)); const gfx_ctx_driver_t *ctx_driver = gl_get_context(gl); if (!gl || !ctx_driver) @@ -1897,7 +1896,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo RARCH_LOG("Detecting screen resolution %ux%u.\n", full_x, full_y); - interval = video->vsync ? settings->video.swap_interval : 0; + interval = video->vsync ? video->swap_interval : 0; video_context_driver_swap_interval(&interval); @@ -2113,7 +2112,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo video_context_driver_input_driver(&inp); - if (settings->video.font_enable) + if (video->font_enable) font_driver_init_osd(gl, false, FONT_DRIVER_RENDER_OPENGL_API); #ifdef HAVE_GL_ASYNC_READBACK diff --git a/gfx/video_driver.c b/gfx/video_driver.c index 28f04a8723..c12e40c1d5 100644 --- a/gfx/video_driver.c +++ b/gfx/video_driver.c @@ -719,20 +719,22 @@ static bool init_video(void) goto error; } - video.width = width; - video.height = height; - video.fullscreen = settings->video.fullscreen; - video.vsync = settings->video.vsync && !runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL); - video.force_aspect = settings->video.force_aspect; + video.width = width; + video.height = height; + video.fullscreen = settings->video.fullscreen; + video.vsync = settings->video.vsync && !runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL); + video.force_aspect = settings->video.force_aspect; #ifdef GEKKO - video.viwidth = settings->video.viwidth; - video.vfilter = settings->video.vfilter; + video.viwidth = settings->video.viwidth; + video.vfilter = settings->video.vfilter; #endif - video.smooth = settings->video.smooth; - video.input_scale = scale; - video.rgb32 = video_driver_state_filter ? + video.smooth = settings->video.smooth; + video.input_scale = scale; + video.rgb32 = video_driver_state_filter ? video_driver_state_out_rgb32 : (video_driver_pix_fmt == RETRO_PIXEL_FORMAT_XRGB8888); + video.swap_interval = settings->video.swap_interval; + video.font_enable = settings->video.font_enable; /* Reset video frame count */ video_driver_frame_count = 0; diff --git a/gfx/video_driver.h b/gfx/video_driver.h index 05acfb0595..2ca649ddd9 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -54,6 +54,10 @@ typedef struct video_info bool force_aspect; + unsigned swap_interval; + + bool font_enable; + #ifdef GEKKO /* TODO - we can't really have driver system-specific * variables in here. There should be some