summaryrefslogtreecommitdiff
path: root/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2010-10-07 23:46:42 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2010-10-07 23:46:42 +0000
commit379b546adf0628a89c529747cda686f46d708b64 (patch)
tree33eab4d5c183009f0eaf3ce5def46158355e9ad7 /legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
parent3a88bc8b71460c71d5d571f79ae9f422b8ee5db5 (diff)
better logging.
* log domains in lower-case only please. let's make it a standard so we don't have to look at the code everytime to figure out the name... * logs do NOT require trailing newline (\n), it's automatic! * do NOT add newline inside log messages! * add gl_common logging. NOTE: I tried to compile all modules, but there are clear broken modules such as cairo and qtopia. Other modules like gl_sdl are broken as they were not updated to new gl_common api (resize method AFAIR). SVN revision: 53174
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/modules/engines/gl_sdl/evas_engine.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
index 6942e89b13..a7b96ec9cf 100644
--- a/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_sdl/evas_engine.c
@@ -855,13 +855,15 @@ static int
855module_open(Evas_Module *em) 855module_open(Evas_Module *em)
856{ 856{
857 if (!em) return 0; 857 if (!em) return 0;
858 if (!evas_gl_common_module_open()) return 0;
858 /* get whatever engine module we inherit from */ 859 /* get whatever engine module we inherit from */
859 if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; 860 if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
860 if (_evas_engine_GL_SDL_log_dom < 0) 861 if (_evas_engine_GL_SDL_log_dom < 0)
861 _evas_engine_GL_SDL_log_dom = eina_log_domain_register("EvasEngineGLSDL", EVAS_DEFAULT_LOG_COLOR); 862 _evas_engine_GL_SDL_log_dom = eina_log_domain_register
863 ("evas-gl_sdl", EVAS_DEFAULT_LOG_COLOR);
862 if (_evas_engine_GL_SDL_log_dom < 0) 864 if (_evas_engine_GL_SDL_log_dom < 0)
863 { 865 {
864 EINA_LOG_ERR("Impossible to create a log domain for GL SDL engine.\n"); 866 EINA_LOG_ERR("Can not create a module log domain.");
865 return 0; 867 return 0;
866 } 868 }
867 /* store it for later use */ 869 /* store it for later use */
@@ -931,6 +933,7 @@ static void
931module_close(Evas_Module *em) 933module_close(Evas_Module *em)
932{ 934{
933 eina_log_domain_unregister(_evas_engine_GL_SDL_log_dom); 935 eina_log_domain_unregister(_evas_engine_GL_SDL_log_dom);
936 evas_gl_common_module_close();
934} 937}
935 938
936static Evas_Module_Api evas_modapi = 939static Evas_Module_Api evas_modapi =
@@ -994,16 +997,12 @@ _sdl_output_setup (int w, int h, int fullscreen, int noframe)
994 997
995 if (!surface) 998 if (!surface)
996 { 999 {
997 CRIT("SDL_SetVideoMode [ %i x %i x 32 ] failed.", w, h); 1000 CRIT("SDL_SetVideoMode [ %i x %i x 32 ] failed. %s", w, h, SDL_GetError());
998 CRIT("SDL: %s\n", SDL_GetError());
999 SDL_Quit(); 1001 SDL_Quit();
1000 exit(-1); 1002 exit(-1);
1001 } 1003 }
1002 1004
1003 fprintf(stderr, "Screen Depth : %d\n", SDL_GetVideoSurface()->format->BitsPerPixel); 1005 INF("Screen Depth: %d, Vendor: '%s', Renderer: '%s', Version: '%s'", SDL_GetVideoSurface()->format->BitsPerPixel, glGetString(GL_VENDOR), glGetString(GL_RENDERER), glGetString(GL_VERSION));
1004 fprintf(stderr, "Vendor : %s\n", glGetString(GL_VENDOR));
1005 fprintf(stderr, "Renderer : %s\n", glGetString(GL_RENDERER));
1006 fprintf(stderr, "Version : %s\n", glGetString(GL_VERSION));
1007 1006
1008 re->gl_context = evas_gl_common_context_new(); 1007 re->gl_context = evas_gl_common_context_new();
1009 if (!re->gl_context) 1008 if (!re->gl_context)