print path when writing screenshots

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4382 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2009-05-07 10:04:54 +00:00
parent c845d478a9
commit 2355056b73
+6 -2
View File
@@ -164,7 +164,9 @@ void jpeg_screenshot(char *imagepath)
s_sprintf(buf)("screenshots/%s.jpg", timestr);
imagepath = buf;
}
FILE *jpegfile = fopen(findfile(path(imagepath), "wb"), "wb");
const char *found = findfile(path(imagepath), "wb");
conoutf("writing to file: %s", found);
FILE *jpegfile = fopen(found, "wb");
if(!jpegfile) return;
struct jpeg_compress_struct cinfo;
@@ -228,7 +230,9 @@ void bmp_screenshot(char *imagepath)
dst += image->pitch;
}
delete[] tmp;
SDL_SaveBMP(image, findfile(path(imagepath), "wb"));
const char *found = findfile(path(imagepath), "wb");
conoutf("writing to file: %s", found);
SDL_SaveBMP(image, found);
SDL_FreeSurface(image);
}