diff options
author | Northstar <northstar@northstar.tf> | 2022-02-03 22:09:08 -0300 |
---|---|---|
committer | Barichello <artur@barichello.me> | 2022-02-03 22:09:08 -0300 |
commit | 75bf194b2fca06de805a7bc025c6dd8379250fa5 (patch) | |
tree | c9327ac7921ae80bb2d91381bb7db11b47ca2403 /NorthstarDedicatedTest/sourceconsole.cpp | |
parent | e9f93ba2e8b9df280aed20131a1606d731d2dbbe (diff) | |
download | NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.tar.gz NorthstarLauncher-75bf194b2fca06de805a7bc025c6dd8379250fa5.zip |
Format project
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 |