Update utils.c
This commit is contained in:
parent
f1bcc131dc
commit
c93bf336fe
1 changed files with 10 additions and 20 deletions
30
src/utils.c
30
src/utils.c
|
@ -32,21 +32,21 @@
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "raylib.h" // WARNING: Required for: LogType enum
|
#include "raylib.h" // WARNING: Required for: LogType enum
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#if defined(PLATFORM_ANDROID)
|
#if defined(PLATFORM_ANDROID)
|
||||||
#include <errno.h>
|
#include <errno.h> // Required for: Android error types
|
||||||
#include <android/log.h>
|
#include <android/log.h> // Required for: Android log system: __android_log_vprint()
|
||||||
#include <android/asset_manager.h>
|
#include <android/asset_manager.h> // Required for: Android assets manager: AAsset, AAssetManager_open(), ...
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h> // Required for: malloc(), free()
|
#include <stdlib.h> // Required for: malloc(), free()
|
||||||
#include <stdio.h> // Required for: fopen(), fclose(), fputc(), fwrite(), printf(), fprintf(), funopen()
|
#include <stdio.h> // Required for: fopen(), fclose(), fputc(), fwrite(), printf(), fprintf(), funopen()
|
||||||
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
|
#include <stdarg.h> // Required for: va_list, va_start(), vfprintf(), va_end()
|
||||||
#include <string.h> // Required for: strlen(), strrchr(), strcmp()
|
#include <string.h> // Required for: strlen(), strrchr(), strcmp()
|
||||||
|
|
||||||
#define MAX_TRACELOG_BUFFER_SIZE 128 // Max length of a trace-log message.
|
#define MAX_TRACELOG_BUFFER_SIZE 128 // Max length of one trace-log message
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Global Variables Definition
|
// Global Variables Definition
|
||||||
|
@ -95,7 +95,7 @@ void SetTraceLogCallback(TraceLogCallback callback)
|
||||||
void TraceLog(int msgType, const char *text, ...)
|
void TraceLog(int msgType, const char *text, ...)
|
||||||
{
|
{
|
||||||
#if defined(SUPPORT_TRACELOG)
|
#if defined(SUPPORT_TRACELOG)
|
||||||
char buffer[MAX_TRACELOG_BUFFER_SIZE];
|
char buffer[MAX_TRACELOG_BUFFER_SIZE] = { 0 };
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, text);
|
va_start(args, text);
|
||||||
|
|
||||||
|
@ -148,16 +148,6 @@ void TraceLog(int msgType, const char *text, ...)
|
||||||
#endif // SUPPORT_TRACELOG
|
#endif // SUPPORT_TRACELOG
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep track of memory allocated
|
|
||||||
// NOTE: mallocType defines the type of data allocated
|
|
||||||
/*
|
|
||||||
void RecordMalloc(int mallocType, int mallocSize, const char *msg)
|
|
||||||
{
|
|
||||||
// TODO: Investigate how to record memory allocation data...
|
|
||||||
// Maybe creating my own malloc function...
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(PLATFORM_ANDROID)
|
#if defined(PLATFORM_ANDROID)
|
||||||
// Initialize asset manager from android app
|
// Initialize asset manager from android app
|
||||||
void InitAssetManager(AAssetManager *manager)
|
void InitAssetManager(AAssetManager *manager)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue