We no longer need the settings struct inside gl_init

This commit is contained in:
twinaphex 2017-01-10 18:08:05 +01:00
parent 8bd12368ef
commit 0b03e95d95
3 changed files with 18 additions and 13 deletions

View File

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

View File

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

View File

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