summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-06 00:08:44 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-06 00:08:44 +0900
commitf319c7a3ec8b934fccdbc396a1bd14caafe7e077 (patch)
tree3aac9795a60c9bc73844bc70c531e09db01106c5 /src/bin
parente7dbe063c9c044f072bacafd31ab872f6210788b (diff)
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.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/config.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/bin/config.c b/src/bin/config.c
index 43d8ea0b1..b421cb727 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -3379,10 +3379,24 @@ _cb_accel_override(void *data EINA_UNUSED, Evas_Object *obj, void *info EINA_UNU
3379} 3379}
3380 3380
3381static void 3381static void
3382_cb_vsync(void *data EINA_UNUSED, Evas_Object *obj, void *info EINA_UNUSED)
3383{
3384 Eina_Bool val = elm_check_state_get(obj);
3385 Eina_Bool sb = elm_config_vsync_get();
3386
3387 if (val != sb)
3388 {
3389 elm_config_vsync_set(val);
3390 elm_config_all_flush();
3391 elm_config_save();
3392 }
3393}
3394
3395static void
3382_status_config_rendering(Evas_Object *win, 3396_status_config_rendering(Evas_Object *win,
3383 Evas_Object *naviframe) 3397 Evas_Object *naviframe)
3384{ 3398{
3385 Evas_Object *li, *bx, *ck; 3399 Evas_Object *li, *bx, *ck, *sp;
3386 Elm_Object_Item *it; 3400 Elm_Object_Item *it;
3387 3401
3388 bx = elm_box_add(win); 3402 bx = elm_box_add(win);
@@ -3431,6 +3445,21 @@ _status_config_rendering(Evas_Object *win,
3431 _cb_accel_override, NULL); 3445 _cb_accel_override, NULL);
3432 elm_check_state_set(ck, elm_config_accel_preference_override_get()); 3446 elm_check_state_set(ck, elm_config_accel_preference_override_get());
3433 3447
3448 /////////////////////////////////////////////
3449 sp = elm_separator_add(win);
3450 elm_separator_horizontal_set(sp, EINA_TRUE);
3451 evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, 0.0);
3452 evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5);
3453 elm_box_pack_end(bx, sp);
3454 evas_object_show(sp);
3455
3456 CHECK_ADD("Tear-free rendering (VSync)",
3457 "This enables Vsync hints for some<br>"
3458 "rendering engines to try keep display<br>"
3459 "VSynced and from Tearing",
3460 _cb_vsync, NULL);
3461 elm_check_state_set(ck, elm_config_vsync_get());
3462
3434 evas_object_data_set(win, "rendering", bx); 3463 evas_object_data_set(win, "rendering", bx);
3435 elm_naviframe_item_simple_push(naviframe, bx); 3464 elm_naviframe_item_simple_push(naviframe, bx);
3436} 3465}