aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarco Lizza <marco.lizza@datalogic.com>2019-01-21 10:05:40 +0100
committerMarco Lizza <marco.lizza@datalogic.com>2019-01-21 10:05:40 +0100
commit343fef4aa4532e21bd74ed84e0339756eb5ab897 (patch)
tree1d8ab4a7ba1fdaf0e17892d184a01e310224c08f /src
parentaaced97b12cc4ba2087e3663b5ae78c40bb74bdb (diff)
downloadraylib-343fef4aa4532e21bd74ed84e0339756eb5ab897.tar.gz
raylib-343fef4aa4532e21bd74ed84e0339756eb5ab897.zip
Changing enums, now referenced as int.
Diffstat (limited to 'src')
-rw-r--r--src/raylib.h8
-rw-r--r--src/utils.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 9929a96d..739199ba 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -819,7 +819,7 @@ typedef enum {
} NPatchType;
// Callbacks to be implemented by users
-typedef void (*TraceLogCallback)(TraceLogType logType, const char *text, va_list args);
+typedef void (*TraceLogCallback)(int logType, const char *text, va_list args);
#if defined(__cplusplus)
extern "C" { // Prevents name mangling of functions
@@ -899,10 +899,10 @@ RLAPI Color Fade(Color color, float alpha); // Color fade-
// Misc. functions
RLAPI void SetConfigFlags(unsigned char flags); // Setup window configuration flags (view FLAGS)
-RLAPI void SetTraceLogLevel(TraceLogType logType); // Set the current threshold (minimum) log level.
-RLAPI void SetTraceLogExit(TraceLogType logType); // Set the exit threshold (minimum) log level.
+RLAPI void SetTraceLogLevel(int logType); // Set the current threshold (minimum) log level.
+RLAPI void SetTraceLogExit(int logType); // Set the exit threshold (minimum) log level.
RLAPI void SetTraceLogCallback(TraceLogCallback callback); // Set a trace log callback to enable custom logging bypassing raylib's one
-RLAPI void TraceLog(TraceLogType logType, const char *text, ...); // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
+RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png)
RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
diff --git a/src/utils.c b/src/utils.c
index ab327272..ffce11fb 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -53,8 +53,8 @@
//----------------------------------------------------------------------------------
// Log types messages
-static TraceLogType logTypeLevel = LOG_INFO;
-static TraceLogType logTypeExit = LOG_ERROR;
+static int logTypeLevel = LOG_INFO;
+static int logTypeExit = LOG_ERROR;
static TraceLogCallback logCallback = NULL;
#if defined(PLATFORM_ANDROID)
@@ -81,13 +81,13 @@ static int android_close(void *cookie);
//----------------------------------------------------------------------------------
// Set the current threshold (minimum) log level.
-void SetTraceLogLevel(TraceLogType logType)
+void SetTraceLogLevel(int logType)
{
logTypeLevel = logType;
}
// Set the exit threshold (minimum) log level.
-void SetTraceLogExit(TraceLogType logType)
+void SetTraceLogExit(int logType)
{
logTypeExit = logType;
}
@@ -99,7 +99,7 @@ void SetTraceLogCallback(TraceLogCallback callback)
}
// Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
-void TraceLog(TraceLogType logType, const char *text, ...)
+void TraceLog(int logType, const char *text, ...)
{
#if defined(SUPPORT_TRACELOG)
if (logType < logTypeLevel) { // Message has level below current threshold, don't emit.