[Toast] Disable toasts for dedis

This commit is contained in:
momo5502 2017-02-23 21:36:02 +01:00
parent c737b4f216
commit 5735731c3e

View File

@ -146,6 +146,8 @@ namespace Components
Toast::Toast() Toast::Toast()
{ {
if (Dedicated::IsEnabled()) return;
Toast::ToastHandler = new WinToastLib::WinToastHandler; Toast::ToastHandler = new WinToastLib::WinToastHandler;
WinToastLib::WinToast::instance()->setAppName(L"IW4x"); WinToastLib::WinToast::instance()->setAppName(L"IW4x");
@ -170,6 +172,8 @@ namespace Components
void Toast::preDestroy() void Toast::preDestroy()
{ {
if (Dedicated::IsEnabled()) return;
// Destroying that on the main thread deadlocks, for whatever reason. // Destroying that on the main thread deadlocks, for whatever reason.
// I did not write the library, so whatever. // I did not write the library, so whatever.
std::thread([]() std::thread([]()