summaryrefslogtreecommitdiffhomepage
path: root/src/utils.c
diff options
context:
space:
mode:
authorRay <[email protected]>2018-04-05 19:18:44 +0200
committerRay <[email protected]>2018-04-05 19:18:44 +0200
commit005f2ffb7502668fe5820d5fe041dea7daaac48c (patch)
tree4ffa5d4e714024161b7140de1b2be2cd7ffeda05 /src/utils.c
parent931b672c92f069a9e2122dc725a371de8fc2c201 (diff)
downloadraylib-005f2ffb7502668fe5820d5fe041dea7daaac48c.tar.gz
raylib-005f2ffb7502668fe5820d5fe041dea7daaac48c.zip
Simplified some code
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c
index 743ef98c..e37b4ff7 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -141,13 +141,14 @@ void TraceLog(int msgType, const char *text, ...)
#endif // SUPPORT_TRACELOG
}
-#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
-
#if defined(SUPPORT_SAVE_BMP)
// Creates a BMP image file from an array of pixel data
void SaveBMP(const char *fileName, unsigned char *imgData, int width, int height, int compSize)
{
+#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
stbi_write_bmp(fileName, width, height, compSize, imgData);
+ TraceLog(LOG_INFO, "BMP Image saved: %s", fileName);
+#endif
}
#endif
@@ -155,9 +156,11 @@ void SaveBMP(const char *fileName, unsigned char *imgData, int width, int height
// Creates a PNG image file from an array of pixel data
void SavePNG(const char *fileName, unsigned char *imgData, int width, int height, int compSize)
{
+#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
stbi_write_png(fileName, width, height, compSize, imgData, width*compSize);
-}
+ TraceLog(LOG_INFO, "PNG Image saved: %s", fileName);
#endif
+}
#endif
// Keep track of memory allocated