summaryrefslogtreecommitdiff
path: root/src/log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.cpp')
-rw-r--r--src/log.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/log.cpp b/src/log.cpp
index 839ebbe..5180705 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -27,6 +27,12 @@ log* get_log()
return &g_log;
}
+void log_clear()
+{
+ g_log.write_cursor = 0;
+ g_log.history_length = 0;
+}
+
static void log_message(const char* fmt, ImVec4 color, va_list args)
{
vsnprintf(g_log.history[g_log.write_cursor], MAX_LEN_LOG_TXT, fmt, args);