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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user