summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-04-07 15:03:19 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-04-07 15:03:49 +0900
commit3f4653de0aa7db255eb7f1eee23c7eeb23fa502a (patch)
treeba07f79585285c7d88b9d6b2f744cdf0b147fa5e
parent8021b5ae2acce47eb2eb17f885a23fc612139250 (diff)
elm_test: (GLView) reset accel_preference after win_add
This might even make the application run with two different engines.
-rw-r--r--src/bin/test_glview.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bin/test_glview.c b/src/bin/test_glview.c
index 4f7c36756..6a7dad96a 100644
--- a/src/bin/test_glview.c
+++ b/src/bin/test_glview.c
@@ -617,19 +617,23 @@ test_glview(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
617 Evas_Object *win, *bx, *bt, *gl, *lb; 617 Evas_Object *win, *bx, *bt, *gl, *lb;
618 Ecore_Animator *ani; 618 Ecore_Animator *ani;
619 GLData *gld = NULL; 619 GLData *gld = NULL;
620 620 const char *accel;
621 // since we want a depth buffer and direct rendering, we need the window
622 // itself to have a depth buffer
623 elm_config_accel_preference_set("gl:depth");
624 621
625 // alloc a data struct to hold our relevant gl info in 622 // alloc a data struct to hold our relevant gl info in
626 if (!(gld = calloc(1, sizeof(GLData)))) return; 623 if (!(gld = calloc(1, sizeof(GLData)))) return;
627 gldata_init(gld); 624 gldata_init(gld);
628 625
626 // add a Z-depth buffer to the window and try to use GL
627 accel = elm_config_accel_preference_get();
628 elm_config_accel_preference_set("gl:depth");
629
629 // new window - do the usual and give it a name, title and delete handler 630 // new window - do the usual and give it a name, title and delete handler
630 win = elm_win_util_standard_add("glview", "GLView"); 631 win = elm_win_util_standard_add("glview", "GLView");
631 elm_win_autodel_set(win, EINA_TRUE); 632 elm_win_autodel_set(win, EINA_TRUE);
632 633
634 // restore previous accel preference
635 elm_config_accel_preference_set(accel);
636
633 bx = elm_box_add(win); 637 bx = elm_box_add(win);
634 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 638 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
635 elm_win_resize_object_add(win, bx); 639 elm_win_resize_object_add(win, bx);