mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
🥀
This commit is contained in:
parent
1e2e3d7dad
commit
a282fa918c
1 changed files with 5 additions and 3 deletions
|
|
@ -40,12 +40,14 @@ struct GLDebugLoggerPrivate{
|
||||||
void writeTimestamp(){
|
void writeTimestamp(){
|
||||||
//https://stackoverflow.com/questions/9628637/how-can-i-get-rid-of-n-from-string-in-c
|
//https://stackoverflow.com/questions/9628637/how-can-i-get-rid-of-n-from-string-in-c
|
||||||
time(×tamp);
|
time(×tamp);
|
||||||
char foo[strlen(ctime(×tamp)) - 1] = ctime(×tamp);
|
char *foo = ctime(×tamp);
|
||||||
*stream << "[GLDEBUG] [" << foo << "]";
|
if (strlen(foo) > 0) // i dont want segfault, im afraid of it >m<
|
||||||
|
foo[strlen(foo) - 1] = '\0';
|
||||||
|
*stream << "[GLDEBUG] [" << foo << "] ";
|
||||||
}
|
}
|
||||||
|
|
||||||
void writeLine(const char *line){
|
void writeLine(const char *line){
|
||||||
*stream << line << "/n";
|
*stream << line << "\n";
|
||||||
stream->flush();
|
stream->flush();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue