diff --git a/src/Chat.c b/src/Chat.c index 4601a8c12..799be90eb 100644 --- a/src/Chat.c +++ b/src/Chat.c @@ -60,12 +60,12 @@ static char logPathBuffer[FILENAME_SIZE]; static String logPath = String_FromArray(logPathBuffer); static struct Stream logStream; -static struct DateTime lastLogDate; +static int lastLogDay, lastLogMonth, lastLogYear; /* Resets log name to empty and resets last log date */ static void ResetLogFile(void) { - logName.length = 0; - lastLogDate.year = -1234; + logName.length = 0; + lastLogYear = -123; } /* Closes handle to the chat log file */ @@ -101,8 +101,8 @@ void Chat_SetLogName(const String* name) { } void Chat_DisableLogging(void) { - Chat_Logging = false; - lastLogDate.year = -5678; + Chat_Logging = false; + lastLogYear = -321; Chat_AddRaw("&cDisabling chat logging"); CloseLogFile(); } @@ -146,12 +146,12 @@ static void AppendChatLog(const String* text) { if (!logName.length || !Chat_Logging) return; DateTime_CurrentLocal(&now); - if (now.day != lastLogDate.day || now.month != lastLogDate.month || now.year != lastLogDate.year) { + if (now.day != lastLogDay || now.month != lastLogMonth || now.year != lastLogYear) { CloseLogFile(); OpenChatLog(&now); } - lastLogDate = now; + lastLogDay = now.day; lastLogMonth = now.month; lastLogYear = now.year; if (!logStream.Meta.File) return; /* [HH:mm:ss] text */ diff --git a/src/Game.c b/src/Game.c index c7a4506be..9037c4a38 100644 --- a/src/Game.c +++ b/src/Game.c @@ -342,7 +342,7 @@ static void LoadOptions(void) { }*/ } -#if defined CC_BUILD_WEB +#ifdef CC_BUILD_MINFILES static void LoadPlugins(void) { } #else static void LoadPlugin(const String* path, void* obj) { @@ -541,7 +541,7 @@ static void PerformScheduledTasks(double time) { } void Game_TakeScreenshot(void) { -#ifndef CC_BUILD_WEB +#ifndef CC_BUILD_MINFILES String filename; char fileBuffer[STRING_SIZE]; String path; char pathBuffer[FILENAME_SIZE]; struct DateTime now;