diff options
author | Felix H. Dahlke <fhd@ubercode.de> | 2013-07-17 00:26:30 +0200 |
---|---|---|
committer | Felix H. Dahlke <fhd@ubercode.de> | 2013-07-17 00:26:30 +0200 |
commit | f7a5c31270c96cf8fd28a0725460b33faa6b5db4 (patch) | |
tree | 17a28a0e07843dff9cdfea53552591c49a893999 /tests/sdl_surface_refcount.c | |
parent | 9bf755607fc7a0e7f446a5e2d6c82738d77d876f (diff) |
Implement SDL_Surface refcounting
Diffstat (limited to 'tests/sdl_surface_refcount.c')
-rw-r--r-- | tests/sdl_surface_refcount.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/sdl_surface_refcount.c b/tests/sdl_surface_refcount.c new file mode 100644 index 00000000..4e9b4896 --- /dev/null +++ b/tests/sdl_surface_refcount.c @@ -0,0 +1,14 @@ +#include <SDL.h> + +int main(int argc, char *argv[]) +{ + SDL_Init(SDL_INIT_VIDEO); + SDL_Surface *screen = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE); + SDL_Surface *reference = screen; + reference->refcount++; + SDL_FreeSurface(screen); + SDL_FreeSurface(reference); + int result = 1; + REPORT_RESULT(); + return 0; +} |