summaryrefslogtreecommitdiff
path: root/plugins/Console/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Console/src')
-rw-r--r--plugins/Console/src/Console.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index a874f8c4cd..d6c3d5dc6e 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -891,10 +891,9 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg, UINT message, WPARAM wParam
////////////////////////////////////////////////////////////////////////////////
-
-void __cdecl ConsoleThread(void*)
+static void __cdecl ConsoleThread(void*)
{
- MThreadHandle threadLock(g_plugin.hConsoleThread);
+ MThreadLock threadLock(g_plugin.hConsoleThread);
CoInitialize(nullptr);
HWND hwnd = CreateDialog(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONSOLE), nullptr, ConsoleDlgProc);
@@ -1210,7 +1209,7 @@ void InitConsole()
LoadSettings();
- mir_forkthread(ConsoleThread);
+ g_plugin.hConsoleThread = mir_forkthread(ConsoleThread);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreshutdownConsole);
HookEvent(ME_SYSTEM_MODULESLOADED, OnSystemModulesLoaded);