Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added magic to detect already freed or otherwise invalid windows and …
Browse files Browse the repository at this point in the history
…textures.
  • Loading branch information
slouken committed Jan 24, 2010
1 parent 6521708 commit 09b6314
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 131 deletions.
4 changes: 4 additions & 0 deletions src/video/SDL_sysvideo.h
Expand Up @@ -37,6 +37,7 @@ typedef struct SDL_VideoDevice SDL_VideoDevice;
/* Define the SDL texture structure */
struct SDL_Texture
{
const void *magic;
Uint32 format; /**< The pixel format of the texture */
int access; /**< SDL_TextureAccess */
int w; /**< The width of the texture */
Expand Down Expand Up @@ -138,6 +139,7 @@ struct SDL_RenderDriver
/* Define the SDL window structure, corresponding to toplevel windows */
struct SDL_Window
{
const void *magic;
Uint32 id;
char *title;
int x, y;
Expand Down Expand Up @@ -308,6 +310,8 @@ struct SDL_VideoDevice
int num_displays;
SDL_VideoDisplay *displays;
int current_display;
Uint8 window_magic;
Uint8 texture_magic;
Uint32 next_object_id;

/* * * */
Expand Down

0 comments on commit 09b6314

Please sign in to comment.