mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 11:06:06 -04:00
use CC_BUILD_MINFILES to disable chat/crash log code, instead of hardcoding to CC_BUILD_WEB
Also avoid referencing DateTime_CurrentLocal and related code in web client now
This commit is contained in:
parent
19f1ff3aa7
commit
007473c9dc
@ -46,7 +46,7 @@ static void AppendChatLogTime(void) {
|
|||||||
Chat_LogTime[logTimesCount++] = now;
|
Chat_LogTime[logTimesCount++] = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CC_BUILD_WEB
|
#ifdef CC_BUILD_MINFILES
|
||||||
static void ResetLogFile(void) { }
|
static void ResetLogFile(void) { }
|
||||||
static void CloseLogFile(void) { }
|
static void CloseLogFile(void) { }
|
||||||
void Chat_SetLogName(const String* name) { }
|
void Chat_SetLogName(const String* name) { }
|
||||||
|
@ -222,6 +222,7 @@ typedef struct TextureRec_ { float U1, V1, U2, V2; } TextureRec;
|
|||||||
#define CC_BUILD_GLES
|
#define CC_BUILD_GLES
|
||||||
#define CC_BUILD_TOUCH
|
#define CC_BUILD_TOUCH
|
||||||
#define CC_BUILD_NOAUDIO
|
#define CC_BUILD_NOAUDIO
|
||||||
|
#define CC_BUILD_MINFILES
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -824,8 +824,11 @@ void Logger_Abort2(cc_result result, const char* raw_msg) {
|
|||||||
static struct Stream logStream;
|
static struct Stream logStream;
|
||||||
static cc_bool logOpen;
|
static cc_bool logOpen;
|
||||||
|
|
||||||
|
#ifdef CC_BUILD_MINFILES
|
||||||
|
void Logger_Log(const String* msg) { }
|
||||||
|
static void Logger_LogCrashHeader(void) { }
|
||||||
|
#else
|
||||||
void Logger_Log(const String* msg) {
|
void Logger_Log(const String* msg) {
|
||||||
#ifndef CC_BUILD_WEB
|
|
||||||
static const String path = String_FromConst("client.log");
|
static const String path = String_FromConst("client.log");
|
||||||
if (!logOpen) {
|
if (!logOpen) {
|
||||||
logOpen = true;
|
logOpen = true;
|
||||||
@ -834,7 +837,6 @@ void Logger_Log(const String* msg) {
|
|||||||
|
|
||||||
if (!logStream.Meta.File) return;
|
if (!logStream.Meta.File) return;
|
||||||
Stream_Write(&logStream, (const cc_uint8*)msg->buffer, msg->length);
|
Stream_Write(&logStream, (const cc_uint8*)msg->buffer, msg->length);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Logger_LogCrashHeader(void) {
|
static void Logger_LogCrashHeader(void) {
|
||||||
@ -851,6 +853,7 @@ static void Logger_LogCrashHeader(void) {
|
|||||||
String_Format3(&msg, "%p2:%p2:%p2" _NL, &now.hour, &now.minute, &now.second);
|
String_Format3(&msg, "%p2:%p2:%p2" _NL, &now.hour, &now.minute, &now.second);
|
||||||
Logger_Log(&msg);
|
Logger_Log(&msg);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void Logger_AbortCommon(cc_result result, const char* raw_msg, void* ctx) {
|
static void Logger_AbortCommon(cc_result result, const char* raw_msg, void* ctx) {
|
||||||
String msg; char msgBuffer[3070 + 1];
|
String msg; char msgBuffer[3070 + 1];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user