From: raster Date: Fri, 29 Jul 2011 06:20:55 +0000 (+0000) Subject: make sure we complain enough on stderr about enignes not being found X-Git-Tag: 2.0_alpha~155^2~192 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08ec1dc81cf030a3978e323f21d5bcf43e5e3d2c;p=framework%2Fuifw%2Fecore.git make sure we complain enough on stderr about enignes not being found by ecore-evas. improved error handling, though not really a bug. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@61878 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore_evas/ecore_evas_directfb.c b/src/lib/ecore_evas/ecore_evas_directfb.c index 7b33293..94ff51a 100644 --- a/src/lib/ecore_evas/ecore_evas_directfb.c +++ b/src/lib/ecore_evas/ecore_evas_directfb.c @@ -545,8 +545,16 @@ ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } ee->engine.func->fn_render = _ecore_evas_directfb_render; _ecore_evas_register(ee); diff --git a/src/lib/ecore_evas/ecore_evas_fb.c b/src/lib/ecore_evas/ecore_evas_fb.c index 579a5ea..8c65040 100644 --- a/src/lib/ecore_evas/ecore_evas_fb.c +++ b/src/lib/ecore_evas/ecore_evas_fb.c @@ -656,8 +656,16 @@ ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h) if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } evas_key_modifier_add(ee->evas, "Shift"); evas_key_modifier_add(ee->evas, "Control"); evas_key_modifier_add(ee->evas, "Alt"); diff --git a/src/lib/ecore_evas/ecore_evas_sdl.c b/src/lib/ecore_evas/ecore_evas_sdl.c index 1e34a2b..9a2048f 100644 --- a/src/lib/ecore_evas/ecore_evas_sdl.c +++ b/src/lib/ecore_evas/ecore_evas_sdl.c @@ -398,8 +398,16 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } #endif } else if (rmethod == evas_render_method_lookup("gl_sdl")) @@ -413,10 +421,24 @@ _ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fu if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } #endif } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } if (!ecore_sdl_init(name)) { diff --git a/src/lib/ecore_evas/ecore_evas_win32.c b/src/lib/ecore_evas/ecore_evas_win32.c index 703513a..edf458a 100644 --- a/src/lib/ecore_evas/ecore_evas_win32.c +++ b/src/lib/ecore_evas/ecore_evas_win32.c @@ -966,8 +966,14 @@ _ecore_evas_engine_software_gdi_init(Ecore_Evas *ee) if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + return 0; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + return 0; + } return 1; } @@ -1000,8 +1006,14 @@ _ecore_evas_engine_software_ddraw_init(Ecore_Evas *ee) if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + return 0; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + return 0; + } return 1; } @@ -1034,8 +1046,14 @@ _ecore_evas_engine_direct3d_init(Ecore_Evas *ee) if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + return 0; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + return 0; + } return 1; } @@ -1067,8 +1085,14 @@ _ecore_evas_engine_opengl_glew_init(Ecore_Evas *ee) if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + return 0; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + return 0; + } return 1; } @@ -1104,8 +1128,14 @@ _ecore_evas_engine_software_16_ddraw_init(Ecore_Evas *ee) if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + return 0; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + return 0; + } return 1; } diff --git a/src/lib/ecore_evas/ecore_evas_wince.c b/src/lib/ecore_evas/ecore_evas_wince.c index ba0fd88..0a87155 100644 --- a/src/lib/ecore_evas/ecore_evas_wince.c +++ b/src/lib/ecore_evas/ecore_evas_wince.c @@ -812,12 +812,24 @@ ecore_evas_software_wince_new_internal(int backend, if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver); + _ecore_evas_wince_shutdown(); + free(ee); + ecore_wince_shutdown(); + return NULL; } ecore_wince_window_backend_set((Ecore_WinCE_Window *)ee->prop.window, backend); ecore_wince_window_suspend_cb_set((Ecore_WinCE_Window *)ee->prop.window, einfo->func.suspend); ecore_wince_window_resume_cb_set((Ecore_WinCE_Window *)ee->prop.window, einfo->func.resume); } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + _ecore_evas_wince_shutdown(); + free(ee); + ecore_wince_shutdown(); + return NULL; + } ee->engine.func->fn_render = _ecore_evas_wince_render; _ecore_evas_register(ee); diff --git a/src/lib/ecore_evas/ecore_evas_x.c b/src/lib/ecore_evas/ecore_evas_x.c index aa6cfaa..1869b76 100644 --- a/src/lib/ecore_evas/ecore_evas_x.c +++ b/src/lib/ecore_evas/ecore_evas_x.c @@ -3183,6 +3183,7 @@ ecore_evas_gl_x11_options_new(const char *disp_name, Ecore_X_Window parent, (ee, ee->engine.x.win_root, x, y, w, h, 0, 0, opt); if (!ee->prop.window) { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); ecore_evas_free(ee); return NULL; } @@ -3519,6 +3520,12 @@ ecore_evas_software_x11_16_new(const char *disp_name, Ecore_X_Window parent, return NULL; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } ecore_x_icccm_hints_set(ee->prop.window, 1 /* accepts_focus */, @@ -3837,6 +3844,12 @@ ecore_evas_software_x11_8_new(const char *disp_name, Ecore_X_Window parent, return NULL; } } + else + { + ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver); + ecore_evas_free(ee); + return NULL; + } ecore_x_icccm_hints_set(ee->prop.window, 1 /* accepts_focus */,