|
|
|
@ -63,6 +63,7 @@ struct ScreenshotFormat {
|
|
|
|
|
const char *name; ///< Name of the format.
|
|
|
|
|
const char *extension; ///< File extension.
|
|
|
|
|
ScreenshotHandlerProc *proc; ///< Function for writing the screenshot.
|
|
|
|
|
bool supports_32bpp; ///< Does this format support 32bpp images?
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*************************************************
|
|
|
|
@ -568,10 +569,10 @@ static bool MakePCXImage(const char *name, ScreenshotCallback *callb, void *user
|
|
|
|
|
/** Available screenshot formats. */
|
|
|
|
|
static const ScreenshotFormat _screenshot_formats[] = {
|
|
|
|
|
#if defined(WITH_PNG)
|
|
|
|
|
{"PNG", "png", &MakePNGImage},
|
|
|
|
|
{"PNG", "png", &MakePNGImage, true},
|
|
|
|
|
#endif
|
|
|
|
|
{"BMP", "bmp", &MakeBMPImage},
|
|
|
|
|
{"PCX", "pcx", &MakePCXImage},
|
|
|
|
|
{"BMP", "bmp", &MakeBMPImage, true},
|
|
|
|
|
{"PCX", "pcx", &MakePCXImage, false},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** Get filename extension of current screenshot file format. */
|
|
|
|
@ -604,6 +605,16 @@ const char *GetScreenshotFormatDesc(int i)
|
|
|
|
|
return _screenshot_formats[i].name;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Determine whether a certain screenshot format support 32bpp images.
|
|
|
|
|
* @param i Number of the screenshot format.
|
|
|
|
|
* @return true if 32bpp is supported.
|
|
|
|
|
*/
|
|
|
|
|
bool GetScreenshotFormatSupports_32bpp(int i)
|
|
|
|
|
{
|
|
|
|
|
return _screenshot_formats[i].supports_32bpp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the screenshot format to use.
|
|
|
|
|
* @param i Number of the format.
|
|
|
|
|