* emotion_test: Fix segv due to wrong init/shutdown.
SVN revision: 44780
This commit is contained in:
parent
e10a8d3234
commit
1c1663bd88
|
@ -53,10 +53,16 @@ main_start(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int mode = 0;
|
int mode = 0;
|
||||||
|
|
||||||
|
eina_init();
|
||||||
|
|
||||||
start_time = ecore_time_get();
|
start_time = ecore_time_get();
|
||||||
if (!ecore_init()) return -1;
|
if (!ecore_init()) return -1;
|
||||||
ecore_app_args_set(argc, (const char **)argv);
|
ecore_app_args_set(argc, (const char **)argv);
|
||||||
ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, NULL);
|
ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, NULL);
|
||||||
|
|
||||||
|
edje_init();
|
||||||
|
edje_frametime_set(1.0 / 30.0);
|
||||||
|
|
||||||
if (!ecore_evas_init()) return -1;
|
if (!ecore_evas_init()) return -1;
|
||||||
#ifndef FB_ONLY
|
#ifndef FB_ONLY
|
||||||
{
|
{
|
||||||
|
@ -93,6 +99,10 @@ main_start(int argc, char **argv)
|
||||||
{
|
{
|
||||||
mode = 3;
|
mode = 3;
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(argv[i], "-auto"))
|
||||||
|
{
|
||||||
|
mode = 4;
|
||||||
|
}
|
||||||
else if ((!strcmp(argv[i], "-vis")) && (i < (argc - 1)))
|
else if ((!strcmp(argv[i], "-vis")) && (i < (argc - 1)))
|
||||||
{
|
{
|
||||||
vis = atoi(argv[i + 1]);
|
vis = atoi(argv[i + 1]);
|
||||||
|
@ -100,6 +110,8 @@ main_start(int argc, char **argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (mode == 4)
|
||||||
|
ecore_evas = ecore_evas_new(NULL, 0, 0, startw, starth, NULL);
|
||||||
#if HAVE_ECORE_EVAS_X
|
#if HAVE_ECORE_EVAS_X
|
||||||
if (mode == 0)
|
if (mode == 0)
|
||||||
ecore_evas = ecore_evas_software_x11_new(NULL, 0, 0, 0, startw, starth);
|
ecore_evas = ecore_evas_software_x11_new(NULL, 0, 0, 0, startw, starth);
|
||||||
|
@ -131,8 +143,6 @@ main_start(int argc, char **argv)
|
||||||
evas_font_cache_set(evas, 1 * 1024 * 1024);
|
evas_font_cache_set(evas, 1 * 1024 * 1024);
|
||||||
evas_font_path_append(evas, PACKAGE_DATA_DIR"/data/fonts");
|
evas_font_path_append(evas, PACKAGE_DATA_DIR"/data/fonts");
|
||||||
|
|
||||||
edje_init();
|
|
||||||
edje_frametime_set(1.0 / 30.0);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,9 +150,13 @@ static void
|
||||||
main_stop(void)
|
main_stop(void)
|
||||||
{
|
{
|
||||||
main_signal_exit(NULL, 0, NULL);
|
main_signal_exit(NULL, 0, NULL);
|
||||||
edje_shutdown();
|
|
||||||
|
ecore_evas_free(ecore_evas);
|
||||||
|
|
||||||
ecore_evas_shutdown();
|
ecore_evas_shutdown();
|
||||||
|
edje_shutdown();
|
||||||
ecore_shutdown();
|
ecore_shutdown();
|
||||||
|
eina_shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue