mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
We no longer need the settings struct inside gl_init
This commit is contained in:
parent
8bd12368ef
commit
0b03e95d95
@ -1876,7 +1876,6 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
|
|||||||
const char *version = NULL;
|
const char *version = NULL;
|
||||||
struct retro_hw_render_callback *hwr = NULL;
|
struct retro_hw_render_callback *hwr = NULL;
|
||||||
char *error_string = NULL;
|
char *error_string = NULL;
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
gl_t *gl = (gl_t*)calloc(1, sizeof(gl_t));
|
gl_t *gl = (gl_t*)calloc(1, sizeof(gl_t));
|
||||||
const gfx_ctx_driver_t *ctx_driver = gl_get_context(gl);
|
const gfx_ctx_driver_t *ctx_driver = gl_get_context(gl);
|
||||||
if (!gl || !ctx_driver)
|
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);
|
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);
|
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);
|
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);
|
font_driver_init_osd(gl, false, FONT_DRIVER_RENDER_OPENGL_API);
|
||||||
|
|
||||||
#ifdef HAVE_GL_ASYNC_READBACK
|
#ifdef HAVE_GL_ASYNC_READBACK
|
||||||
|
@ -719,20 +719,22 @@ static bool init_video(void)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
video.width = width;
|
video.width = width;
|
||||||
video.height = height;
|
video.height = height;
|
||||||
video.fullscreen = settings->video.fullscreen;
|
video.fullscreen = settings->video.fullscreen;
|
||||||
video.vsync = settings->video.vsync && !runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL);
|
video.vsync = settings->video.vsync && !runloop_ctl(RUNLOOP_CTL_IS_NONBLOCK_FORCED, NULL);
|
||||||
video.force_aspect = settings->video.force_aspect;
|
video.force_aspect = settings->video.force_aspect;
|
||||||
#ifdef GEKKO
|
#ifdef GEKKO
|
||||||
video.viwidth = settings->video.viwidth;
|
video.viwidth = settings->video.viwidth;
|
||||||
video.vfilter = settings->video.vfilter;
|
video.vfilter = settings->video.vfilter;
|
||||||
#endif
|
#endif
|
||||||
video.smooth = settings->video.smooth;
|
video.smooth = settings->video.smooth;
|
||||||
video.input_scale = scale;
|
video.input_scale = scale;
|
||||||
video.rgb32 = video_driver_state_filter ?
|
video.rgb32 = video_driver_state_filter ?
|
||||||
video_driver_state_out_rgb32 :
|
video_driver_state_out_rgb32 :
|
||||||
(video_driver_pix_fmt == RETRO_PIXEL_FORMAT_XRGB8888);
|
(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 */
|
/* Reset video frame count */
|
||||||
video_driver_frame_count = 0;
|
video_driver_frame_count = 0;
|
||||||
|
@ -54,6 +54,10 @@ typedef struct video_info
|
|||||||
|
|
||||||
bool force_aspect;
|
bool force_aspect;
|
||||||
|
|
||||||
|
unsigned swap_interval;
|
||||||
|
|
||||||
|
bool font_enable;
|
||||||
|
|
||||||
#ifdef GEKKO
|
#ifdef GEKKO
|
||||||
/* TODO - we can't really have driver system-specific
|
/* TODO - we can't really have driver system-specific
|
||||||
* variables in here. There should be some
|
* variables in here. There should be some
|
||||||
|
Loading…
x
Reference in New Issue
Block a user