aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2018-04-12 19:31:53 +0200
committerAhmad Fatoum <ahmad@a3f.at>2018-05-21 12:15:39 +0200
commite025e62445913bf1ec9cf075eaaf1dc7374da83c (patch)
tree76d9cf1898ebbf9e2bc2b08639c0523c9d0b9164 /src/utils.c
parentcea78e4fc16a317ef7ffd7dd537c8b47f77dca57 (diff)
downloadraylib-e025e62445913bf1ec9cf075eaaf1dc7374da83c.tar.gz
raylib-e025e62445913bf1ec9cf075eaaf1dc7374da83c.zip
cmake: Fix PLATFORM_WEB build
Did this ever work? Surely, doesn't look like it...
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/utils.c b/src/utils.c
index cd75e695..74780680 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -143,31 +143,27 @@ void TraceLog(int msgType, const char *text, ...)
va_end(args);
if (msgType == LOG_ERROR) exit(1); // If LOG_ERROR message, exit program
-
+
#endif // SUPPORT_TRACELOG
}
-#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)
+#if defined(SUPPORT_SAVE_BMP) && (defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI))
stbi_write_bmp(fileName, width, height, compSize, imgData);
TraceLog(LOG_INFO, "BMP Image saved: %s", fileName);
#endif
}
-#endif
-#if defined(SUPPORT_SAVE_PNG)
// 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)
+#if defined(SUPPORT_SAVE_PNG) && (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
// NOTE: mallocType defines the type of data allocated