git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@880 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-04-01 23:42:03 +00:00
parent fb831f2cad
commit ff6481e8c5
5 changed files with 75 additions and 8 deletions
+5 -1
View File
@@ -57,7 +57,11 @@ void screenshot(char *imagepath)
memcpy(dest, (char *)image->pixels+image->pitch*(scr_h-1-idx), 3*scr_w);
endianswap(dest, 3, scr_w);
}
if(!imagepath) s_sprintf(imagepath)("screenshots/screenshot_%d.bmp", lastmillis);
if(!imagepath)
{
imagepath = new string;
s_sprintf(imagepath)("screenshots/screenshot_%d.bmp", lastmillis);
}
SDL_SaveBMP(temp, path(imagepath));
SDL_FreeSurface(temp);
}