aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/sourceconsole.h
diff options
context:
space:
mode:
Diffstat (limited to 'NorthstarDedicatedTest/sourceconsole.h')
-rw-r--r--NorthstarDedicatedTest/sourceconsole.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/NorthstarDedicatedTest/sourceconsole.h b/NorthstarDedicatedTest/sourceconsole.h
index 7815cd03..79ab2267 100644
--- a/NorthstarDedicatedTest/sourceconsole.h
+++ b/NorthstarDedicatedTest/sourceconsole.h
@@ -1,8 +1,8 @@
#pragma once
#include "pch.h"
#include "sourceinterface.h"
-
-void InitialiseSourceConsole(HMODULE baseAddress);
+#include "spdlog/sinks/base_sink.h"
+#include <map>
class EditablePanel
{
@@ -87,4 +87,21 @@ public:
CConsoleDialog* m_pConsole;
};
-extern SourceInterface<CGameConsole>* g_pSourceGameConsole; \ No newline at end of file
+extern SourceInterface<CGameConsole>* g_SourceGameConsole;
+
+// spdlog logger
+class SourceConsoleSink : public spdlog::sinks::base_sink<std::mutex>
+{
+private:
+ std::map<spdlog::level::level_enum, SourceColor> logColours;
+
+public:
+ SourceConsoleSink();
+
+protected:
+ void sink_it_(const spdlog::details::log_msg& msg) override;
+ void flush_() override;
+};
+
+void InitialiseSourceConsole(HMODULE baseAddress);
+void InitialiseConsoleOnInterfaceCreation(); \ No newline at end of file