mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-05 15:11:16 +00:00
Fixes for Windows
This commit is contained in:
parent
0954efff58
commit
7013443003
2 changed files with 8 additions and 0 deletions
|
@ -7,9 +7,13 @@
|
|||
|
||||
static void _debuglog_print_timestamp(void) {
|
||||
time_t ltime = time(NULL);
|
||||
#if defined(_WIN32)
|
||||
char* str = asctime(localtime(<ime));
|
||||
#else
|
||||
struct tm ltime2 = { 0 };
|
||||
localtime_r(<ime, <ime2);
|
||||
char* str = asctime(<ime2);
|
||||
#endif
|
||||
printf("%.*s", (int)strlen(str) - 1, str);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,9 +26,13 @@ void logfile_close(enum LogFileType logFileType);
|
|||
static void _logfile_print_timestamp(enum LogFileType logFileType) {
|
||||
FILE* f = gLogFiles[logFileType].file;
|
||||
time_t ltime = time(NULL);
|
||||
#if defined(_WIN32)
|
||||
char* str = asctime(localtime(<ime));
|
||||
#else
|
||||
struct tm ltime2 = { 0 };
|
||||
localtime_r(<ime, <ime2);
|
||||
char* str = asctime(<ime2);
|
||||
#endif
|
||||
fprintf(f, "%.*s", (int)strlen(str) - 1, str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue