From 2355056b7372a691091dfdf37cc6337d0ff271be Mon Sep 17 00:00:00 2001 From: ac_stef Date: Thu, 7 May 2009 10:04:54 +0000 Subject: [PATCH] print path when writing screenshots git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4382 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/src/main.cpp b/source/src/main.cpp index 1cf10039..6330d179 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -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); }