comparison src/video/SDL_sysvideo.h @ 3695:f6a8be3fefa0

Added magic to detect already freed or otherwise invalid windows and textures.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 24 Jan 2010 20:21:51 +0000
parents 64ce267332c6
children f7b03b6838cb
comparison
equal deleted inserted replaced
3694:b0a707f589a6 3695:f6a8be3fefa0
35 typedef struct SDL_VideoDevice SDL_VideoDevice; 35 typedef struct SDL_VideoDevice SDL_VideoDevice;
36 36
37 /* Define the SDL texture structure */ 37 /* Define the SDL texture structure */
38 struct SDL_Texture 38 struct SDL_Texture
39 { 39 {
40 const void *magic;
40 Uint32 format; /**< The pixel format of the texture */ 41 Uint32 format; /**< The pixel format of the texture */
41 int access; /**< SDL_TextureAccess */ 42 int access; /**< SDL_TextureAccess */
42 int w; /**< The width of the texture */ 43 int w; /**< The width of the texture */
43 int h; /**< The height of the texture */ 44 int h; /**< The height of the texture */
44 int modMode; /**< The texture modulation mode */ 45 int modMode; /**< The texture modulation mode */
136 }; 137 };
137 138
138 /* Define the SDL window structure, corresponding to toplevel windows */ 139 /* Define the SDL window structure, corresponding to toplevel windows */
139 struct SDL_Window 140 struct SDL_Window
140 { 141 {
142 const void *magic;
141 Uint32 id; 143 Uint32 id;
142 char *title; 144 char *title;
143 int x, y; 145 int x, y;
144 int w, h; 146 int w, h;
145 Uint32 flags; 147 Uint32 flags;
306 /* Data common to all drivers */ 308 /* Data common to all drivers */
307 SDL_bool suspend_screensaver; 309 SDL_bool suspend_screensaver;
308 int num_displays; 310 int num_displays;
309 SDL_VideoDisplay *displays; 311 SDL_VideoDisplay *displays;
310 int current_display; 312 int current_display;
313 Uint8 window_magic;
314 Uint8 texture_magic;
311 Uint32 next_object_id; 315 Uint32 next_object_id;
312 316
313 /* * * */ 317 /* * * */
314 /* Data used by the GL drivers */ 318 /* Data used by the GL drivers */
315 struct 319 struct