diff options
Diffstat (limited to 'NorthstarDedicatedTest/sourceconsole.cpp')
-rw-r--r-- | NorthstarDedicatedTest/sourceconsole.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/NorthstarDedicatedTest/sourceconsole.cpp b/NorthstarDedicatedTest/sourceconsole.cpp index 98901737..e6f46c13 100644 --- a/NorthstarDedicatedTest/sourceconsole.cpp +++ b/NorthstarDedicatedTest/sourceconsole.cpp @@ -15,7 +15,7 @@ void ConCommand_toggleconsole(const CCommand& arg) (*g_SourceGameConsole)->Activate(); } -typedef void(*OnCommandSubmittedType)(CConsoleDialog* consoleDialog, const char* pCommand); +typedef void (*OnCommandSubmittedType)(CConsoleDialog* consoleDialog, const char* pCommand); OnCommandSubmittedType onCommandSubmittedOriginal; void OnCommandSubmittedHook(CConsoleDialog* consoleDialog, const char* pCommand) { @@ -40,7 +40,9 @@ void InitialiseConsoleOnInterfaceCreation() // hook OnCommandSubmitted so we print inputted commands HookEnabler hook; - ENABLER_CREATEHOOK(hook, (void*)((*g_SourceGameConsole)->m_pConsole->m_vtable->OnCommandSubmitted), &OnCommandSubmittedHook, reinterpret_cast<LPVOID*>(&onCommandSubmittedOriginal)); + ENABLER_CREATEHOOK( + hook, (void*)((*g_SourceGameConsole)->m_pConsole->m_vtable->OnCommandSubmitted), &OnCommandSubmittedHook, + reinterpret_cast<LPVOID*>(&onCommandSubmittedOriginal)); } void InitialiseSourceConsole(HMODULE baseAddress) @@ -52,7 +54,6 @@ void InitialiseSourceConsole(HMODULE baseAddress) RegisterConCommand("toggleconsole", ConCommand_toggleconsole, "toggles the console", FCVAR_NONE); } - // logging stuff SourceConsoleSink::SourceConsoleSink() @@ -73,7 +74,8 @@ void SourceConsoleSink::sink_it_(const spdlog::details::log_msg& msg) spdlog::memory_buf_t formatted; spdlog::sinks::base_sink<std::mutex>::formatter_->format(msg, formatted); - (*g_SourceGameConsole)->m_pConsole->m_pConsolePanel->ColorPrint(logColours[msg.level], fmt::to_string(formatted).c_str()); // todo needs colour support + (*g_SourceGameConsole) + ->m_pConsole->m_pConsolePanel->ColorPrint(logColours[msg.level], fmt::to_string(formatted).c_str()); // todo needs colour support } void SourceConsoleSink::flush_() {}
\ No newline at end of file |