DirectDraw screenshot routine now also outputs file name on error;

Another attempt to make the routine not fire too many times in a row.
This commit is contained in:
OBattler
2016-07-11 03:26:08 +02:00
parent f379524294
commit c377f13cae
2 changed files with 46 additions and 11 deletions

View File

@@ -71,6 +71,8 @@ void SaveBitmap(char *szFilename,HBITMAP hBitmap)
BITMAPINFO bmpInfo;
BITMAPFILEHEADER bmpFileHeader;
char *szMessage;
do{
hdc=GetDC(NULL);
@@ -101,7 +103,8 @@ void SaveBitmap(char *szFilename,HBITMAP hBitmap)
if((fp = fopen(szFilename,"wb"))==NULL)
{
MessageBox( NULL, "Unable to Create Bitmap File", "Error", MB_OK|MB_ICONERROR);
sprintf(szMessage, "Unable to Create Bitmap File %s", szFilename);
MessageBox( NULL, szMessage, "Error", MB_OK|MB_ICONERROR);
break;
}