summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLudovic Pouzenc <lpouzenc@gmail.com>2013-07-16 21:13:07 +0200
committerLudovic Pouzenc <lpouzenc@gmail.com>2013-07-16 21:13:07 +0200
commitd4bd10cb2c43f7e57d5e120457bdc5aa3de2d0b9 (patch)
treeb26a4b21f55b6ba0522165fbcfefda9045f72df0 /src
parenta3faaf6f1270e7af4789da1bda4e3e478ce33960 (diff)
downloadmplemmings-d4bd10cb2c43f7e57d5e120457bdc5aa3de2d0b9.tar.gz
mplemmings-d4bd10cb2c43f7e57d5e120457bdc5aa3de2d0b9.tar.bz2
mplemmings-d4bd10cb2c43f7e57d5e120457bdc5aa3de2d0b9.zip
Ajout d'un appel pour detruire la texture utilisee a la sortie. valgrind truove qd meme des choses a redire, mais il semble que c'est dans la lib, pas dans mon code...
Diffstat (limited to 'src')
-rw-r--r--src/sandbox/sprite.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sandbox/sprite.c b/src/sandbox/sprite.c
index d624e3e..7aafccf 100644
--- a/src/sandbox/sprite.c
+++ b/src/sandbox/sprite.c
@@ -75,6 +75,7 @@ int main(int argc, char *argv[]) {
SDL_Delay(50);
}
+ SDL_DestroyTexture(t1);
SDL_DestroyRenderer(sdl_rend);
SDL_DestroyWindow(sdl_win);
SDL_Quit();
@@ -97,8 +98,8 @@ void my_SDL_init_or_die(char title[], SDL_Rect win_pos, Uint32 init_flags, Uint3
res=SDL_Init(init_flags);
mpl_check(
- res==0,
- {exit(1);} , // Executed code if expression is not true
+ res==0, // Expression to evaluate
+ {exit(1);} , // Code to execute if expression is not true
SDL_LOG_PRIORITY_CRITICAL, // SDL_LogPriority (_CRITICAL, _ERROR, _WARN, _INFO, DEBUG, _VERBOSE)
"SDL_Init failed (%i)",res // var args list starting with a fmt string like in printf()
);