comparison src/render/SDL_render.c @ 5226:2ee8112bfc6b

Added a simple log message API
author Sam Lantinga <slouken@libsdl.org>
date Mon, 07 Feb 2011 16:45:40 -0800
parents 115fff0641ee
children 2178ffe17222
comparison
equal deleted inserted replaced
5225:1fbe1c202501 5226:2ee8112bfc6b
22 #include "SDL_config.h" 22 #include "SDL_config.h"
23 23
24 /* The SDL 2D rendering system */ 24 /* The SDL 2D rendering system */
25 25
26 #include "SDL_hints.h" 26 #include "SDL_hints.h"
27 #include "SDL_log.h"
27 #include "SDL_render.h" 28 #include "SDL_render.h"
28 #include "SDL_sysrender.h" 29 #include "SDL_sysrender.h"
29 #include "../video/SDL_pixels_c.h" 30 #include "../video/SDL_pixels_c.h"
30 #include "software/SDL_render_sw_c.h" 31 #include "software/SDL_render_sw_c.h"
31 32
157 if (renderer) { 158 if (renderer) {
158 renderer->magic = &renderer_magic; 159 renderer->magic = &renderer_magic;
159 renderer->window = window; 160 renderer->window = window;
160 161
161 SDL_AddEventWatch(SDL_RendererEventWatch, renderer); 162 SDL_AddEventWatch(SDL_RendererEventWatch, renderer);
163
164 SDL_LogInfo(SDL_LOG_CATEGORY_RENDER,
165 "Created renderer: %s", renderer->info.name);
162 } 166 }
163 return renderer; 167 return renderer;
164 } 168 }
165 169
166 SDL_Renderer * 170 SDL_Renderer *