Review config flags #1784
This commit is contained in:
parent
cc4de1d1f9
commit
89e734de6b
@ -67,6 +67,7 @@
|
||||
#include <stdlib.h> // Required for: malloc(), free()
|
||||
#include <string.h> // Required for: strlen() [Used in ImageTextEx()]
|
||||
#include <math.h> // Required for: fabsf()
|
||||
#include <stdio.h> // Required for: sprintf() [Used in ExportImageAsCode()]
|
||||
|
||||
#include "utils.h" // Required for: fopen() Android mapping
|
||||
|
||||
@ -122,7 +123,7 @@
|
||||
// NOTE: Used to read image data (multiple formats support)
|
||||
#endif
|
||||
|
||||
#if (defined(SUPPORT_IMAGE_EXPORT) || defined(SUPPORT_COMPRESSION_API))
|
||||
#if defined(SUPPORT_IMAGE_EXPORT)
|
||||
#define STBIW_MALLOC RL_MALLOC
|
||||
#define STBIW_FREE RL_FREE
|
||||
#define STBIW_REALLOC RL_REALLOC
|
||||
@ -459,6 +460,8 @@ bool ExportImageAsCode(Image image, const char *fileName)
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
#if defined(SUPPORT_IMAGE_EXPORT)
|
||||
|
||||
#ifndef TEXT_BYTES_PER_LINE
|
||||
#define TEXT_BYTES_PER_LINE 20
|
||||
#endif
|
||||
@ -500,6 +503,11 @@ bool ExportImageAsCode(Image image, const char *fileName)
|
||||
success = SaveFileText(fileName, txtData);
|
||||
|
||||
RL_FREE(txtData);
|
||||
|
||||
#endif // SUPPORT_IMAGE_EXPORT
|
||||
|
||||
if (success != 0) TRACELOG(LOG_INFO, "FILEIO: [%s] Image exported successfully", fileName);
|
||||
else TRACELOG(LOG_WARNING, "FILEIO: [%s] Failed to export image", fileName);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user