added proper define checks for png-save if it's disabled
This commit is contained in:
parent
2388cbc3cd
commit
08fc886afd
2 changed files with 2 additions and 2 deletions
|
@ -1134,7 +1134,7 @@ void SetConfigFlags(char flags)
|
||||||
// Takes a screenshot of current screen (saved a .png)
|
// Takes a screenshot of current screen (saved a .png)
|
||||||
void TakeScreenshot(const char *fileName)
|
void TakeScreenshot(const char *fileName)
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
|
#if (defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)) && defined(SUPPORT_SAVE_PNG)
|
||||||
unsigned char *imgData = rlReadScreenPixels(renderWidth, renderHeight);
|
unsigned char *imgData = rlReadScreenPixels(renderWidth, renderHeight);
|
||||||
SavePNG(fileName, imgData, renderWidth, renderHeight, 4); // Save image as PNG
|
SavePNG(fileName, imgData, renderWidth, renderHeight, 4); // Save image as PNG
|
||||||
free(imgData);
|
free(imgData);
|
||||||
|
|
|
@ -554,7 +554,7 @@ void UpdateTexture(Texture2D texture, const void *pixels)
|
||||||
// Save image to a PNG file
|
// Save image to a PNG file
|
||||||
void SaveImageAs(const char* fileName, Image image)
|
void SaveImageAs(const char* fileName, Image image)
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
|
#if (defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)) && defined(SUPPORT_SAVE_PNG)
|
||||||
unsigned char* imgData = (unsigned char*)GetImageData(image); // this works since Color is just a container for the RGBA values
|
unsigned char* imgData = (unsigned char*)GetImageData(image); // this works since Color is just a container for the RGBA values
|
||||||
SavePNG(fileName, imgData, image.width, image.height, 4);
|
SavePNG(fileName, imgData, image.width, image.height, 4);
|
||||||
free(imgData);
|
free(imgData);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue