Review last PR formatting
This commit is contained in:
parent
e91c84e33a
commit
4467292a2d
12
src/raylib.h
12
src/raylib.h
@ -423,14 +423,14 @@ typedef enum {
|
||||
|
||||
// Trace log type
|
||||
typedef enum {
|
||||
LOG_ALL, // Display all logs
|
||||
LOG_ALL, // Display all logs
|
||||
LOG_TRACE,
|
||||
LOG_DEBUG,
|
||||
LOG_INFO,
|
||||
LOG_WARNING,
|
||||
LOG_ERROR,
|
||||
LOG_FATAL,
|
||||
LOG_NONE // Disable logging
|
||||
LOG_NONE // Disable logging
|
||||
} TraceLogType;
|
||||
|
||||
// Keyboard keys
|
||||
@ -900,10 +900,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(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(int logType, const char *text, ...); // Show trace log messages (LOG_INFO, LOG_WARNING, LOG_ERROR, LOG_DEBUG)
|
||||
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
|
||||
RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERROR)
|
||||
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)
|
||||
|
||||
|
14
src/utils.c
14
src/utils.c
@ -66,8 +66,7 @@ AAssetManager *assetManager;
|
||||
//----------------------------------------------------------------------------------
|
||||
#if defined(PLATFORM_ANDROID)
|
||||
/* This should be in <stdio.h>, but Travis doesn't find it... */
|
||||
FILE *funopen(const void *cookie, int (*readfn)(void *, char *, int),
|
||||
int (*writefn)(void *, const char *, int),
|
||||
FILE *funopen(const void *cookie, int (*readfn)(void *, char *, int), int (*writefn)(void *, const char *, int),
|
||||
fpos_t (*seekfn)(void *, fpos_t, int), int (*closefn)(void *));
|
||||
|
||||
static int android_read(void *cookie, char *buf, int size);
|
||||
@ -80,19 +79,19 @@ static int android_close(void *cookie);
|
||||
// Module Functions Definition - Utilities
|
||||
//----------------------------------------------------------------------------------
|
||||
|
||||
// Set the current threshold (minimum) log level.
|
||||
// Set the current threshold (minimum) log level
|
||||
void SetTraceLogLevel(int logType)
|
||||
{
|
||||
logTypeLevel = logType;
|
||||
}
|
||||
|
||||
// Set the exit threshold (minimum) log level.
|
||||
// Set the exit threshold (minimum) log level
|
||||
void SetTraceLogExit(int logType)
|
||||
{
|
||||
logTypeExit = logType;
|
||||
}
|
||||
|
||||
// Set a trace log callback to enable custom logging bypassing raylib's one
|
||||
// Set a trace log callback to enable custom logging
|
||||
void SetTraceLogCallback(TraceLogCallback callback)
|
||||
{
|
||||
logCallback = callback;
|
||||
@ -102,9 +101,8 @@ void SetTraceLogCallback(TraceLogCallback callback)
|
||||
void TraceLog(int logType, const char *text, ...)
|
||||
{
|
||||
#if defined(SUPPORT_TRACELOG)
|
||||
if (logType < logTypeLevel) { // Message has level below current threshold, don't emit.
|
||||
return;
|
||||
}
|
||||
// Message has level below current threshold, don't emit
|
||||
if (logType < logTypeLevel) return;
|
||||
|
||||
va_list args;
|
||||
va_start(args, text);
|
||||
|
Loading…
Reference in New Issue
Block a user