mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
Check g_settings.video.hard_sync per frame.
Don't use hard_sync default in RGUI.
This commit is contained in:
parent
6992ab8943
commit
f5d4008018
@ -1289,8 +1289,8 @@ static void rgui_settings_shader_manager_populate_entries(rgui_handle_t *rgui)
|
||||
rgui_list_push(rgui->selection_buf, "Toggle Fullscreen", RGUI_SETTINGS_TOGGLE_FULLSCREEN, 0);
|
||||
#endif
|
||||
rgui_list_push(rgui->selection_buf, "Rotation", RGUI_SETTINGS_VIDEO_ROTATION, 0);
|
||||
rgui_list_push(rgui->selection_buf, "Vertical sync", RGUI_SETTINGS_VIDEO_VSYNC, 0);
|
||||
rgui_list_push(rgui->selection_buf, "Hard sync", RGUI_SETTINGS_VIDEO_HARD_SYNC, 0);
|
||||
rgui_list_push(rgui->selection_buf, "VSync", RGUI_SETTINGS_VIDEO_VSYNC, 0);
|
||||
rgui_list_push(rgui->selection_buf, "Hard VSync", RGUI_SETTINGS_VIDEO_HARD_SYNC, 0);
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
rgui_list_push(rgui->selection_buf, "Apply Shader Changes",
|
||||
RGUI_SETTINGS_SHADER_APPLY, 0);
|
||||
@ -1522,7 +1522,7 @@ static int shader_manager_toggle_setting(rgui_handle_t *rgui, unsigned setting,
|
||||
switch (action)
|
||||
{
|
||||
case RGUI_ACTION_START:
|
||||
g_settings.video.hard_sync = true;
|
||||
g_settings.video.hard_sync = false;
|
||||
break;
|
||||
|
||||
case RGUI_ACTION_LEFT:
|
||||
|
6
gfx/gl.c
6
gfx/gl.c
@ -1467,7 +1467,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
||||
g_extern.frame_count++;
|
||||
|
||||
#ifdef HAVE_GL_SYNC
|
||||
if (gl->use_sync)
|
||||
if (g_settings.video.hard_sync && gl->have_sync)
|
||||
{
|
||||
RARCH_PERFORMANCE_INIT(gl_fence);
|
||||
RARCH_PERFORMANCE_START(gl_fence);
|
||||
@ -1570,8 +1570,8 @@ static bool resolve_extensions(gl_t *gl)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GL_SYNC
|
||||
gl->use_sync = g_settings.video.hard_sync && load_sync_proc(gl);
|
||||
if (gl->use_sync)
|
||||
gl->have_sync = load_sync_proc(gl);
|
||||
if (gl->have_sync && g_settings.video.hard_sync)
|
||||
RARCH_LOG("[GL]: Using ARB_sync to reduce latency.\n");
|
||||
#endif
|
||||
|
||||
|
@ -283,7 +283,7 @@ typedef struct gl
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GL_SYNC
|
||||
bool use_sync;
|
||||
bool have_sync;
|
||||
#endif
|
||||
} gl_t;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user