emscripten/tests/sdl_surface_refcount.c

16 строки
408 B
C
Исходник Обычный вид История

2013-07-17 02:26:30 +04:00
#include <SDL.h>
#include <stdio.h>
2013-07-17 02:26:30 +04:00
int main(int argc, char *argv[])
{
SDL_Surface* surface = SDL_CreateRGBSurface(SDL_SWSURFACE, 10, 10, 32,
0, 0, 0, 0);
SDL_Surface *reference = surface;
2013-07-17 02:26:30 +04:00
reference->refcount++;
SDL_FreeSurface(surface);
2013-07-17 02:26:30 +04:00
SDL_FreeSurface(reference);
int result = surface->refcount;
2013-07-17 02:26:30 +04:00
REPORT_RESULT();
return 0;
}