Check g_settings.video.hard_sync per frame.

Don't use hard_sync default in RGUI.
This commit is contained in:
Themaister 2013-05-04 22:48:24 +02:00
parent 6992ab8943
commit f5d4008018
3 changed files with 7 additions and 7 deletions

View File

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

View File

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

View File

@ -283,7 +283,7 @@ typedef struct gl
#endif
#ifdef HAVE_GL_SYNC
bool use_sync;
bool have_sync;
#endif
} gl_t;