elm config - expose vsync config so people can turn it on

just modifies config tool so vsync can go on as it should given efl
vsync work etc.
This commit is contained in:
Carsten Haitzler 2014-08-06 00:08:44 +09:00
parent f54afe89cc
commit 3b9ecf8c80
1 changed files with 30 additions and 1 deletions

View File

@ -3378,11 +3378,25 @@ _cb_accel_override(void *data EINA_UNUSED, Evas_Object *obj, void *info EINA_UNU
}
}
static void
_cb_vsync(void *data EINA_UNUSED, Evas_Object *obj, void *info EINA_UNUSED)
{
Eina_Bool val = elm_check_state_get(obj);
Eina_Bool sb = elm_config_vsync_get();
if (val != sb)
{
elm_config_vsync_set(val);
elm_config_all_flush();
elm_config_save();
}
}
static void
_status_config_rendering(Evas_Object *win,
Evas_Object *naviframe)
{
Evas_Object *li, *bx, *ck;
Evas_Object *li, *bx, *ck, *sp;
Elm_Object_Item *it;
bx = elm_box_add(win);
@ -3431,6 +3445,21 @@ _status_config_rendering(Evas_Object *win,
_cb_accel_override, NULL);
elm_check_state_set(ck, elm_config_accel_preference_override_get());
/////////////////////////////////////////////
sp = elm_separator_add(win);
elm_separator_horizontal_set(sp, EINA_TRUE);
evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5);
elm_box_pack_end(bx, sp);
evas_object_show(sp);
CHECK_ADD("Tear-free rendering (VSync)",
"This enables Vsync hints for some<br>"
"rendering engines to try keep display<br>"
"VSynced and from Tearing",
_cb_vsync, NULL);
elm_check_state_set(ck, elm_config_vsync_get());
evas_object_data_set(win, "rendering", bx);
elm_naviframe_item_simple_push(naviframe, bx);
}