diff --git a/deps/WinToast b/deps/WinToast index 3dd48237..2a35d367 160000 --- a/deps/WinToast +++ b/deps/WinToast @@ -1 +1 @@ -Subproject commit 3dd4823791c447b14e8eacd67487a953f1ecf98a +Subproject commit 2a35d367c54e34c8beef62c2a0b1022688a2b8cc diff --git a/deps/libtomcrypt b/deps/libtomcrypt index 08cc7800..4efe2297 160000 --- a/deps/libtomcrypt +++ b/deps/libtomcrypt @@ -1 +1 @@ -Subproject commit 08cc78007b95fc52e3d2eac86950fa1fd811c1a4 +Subproject commit 4efe22972671ae6e8d9878d56f0e77c0daef7230 diff --git a/src/Components/Modules/Toast.cpp b/src/Components/Modules/Toast.cpp index 267afea1..c4037af0 100644 --- a/src/Components/Modules/Toast.cpp +++ b/src/Components/Modules/Toast.cpp @@ -5,7 +5,7 @@ namespace Components std::queue Toast::Queue; std::mutex Toast::Mutex; - WinToastLib::WinToastHandler* Toast::ToastHandler = nullptr; + Toast::WinToastHandler* Toast::ToastHandler = nullptr; void Toast::Show(std::string image, std::string title, std::string description, int length) { @@ -17,7 +17,7 @@ namespace Components bool Toast::ShowNative(const WinToastLib::WinToastTemplate& toast) { if (!Loader::IsComInitialized() || !Toast::ToastHandler) return false; - return WinToastLib::WinToast::instance()->showToast(toast, Toast::ToastHandler); + return WinToastLib::WinToast::instance()->showToast(toast, Toast::ToastHandler) != 0; } std::string Toast::GetIcon() @@ -150,7 +150,7 @@ namespace Components if (Loader::IsComInitialized()) { - Toast::ToastHandler = new WinToastLib::WinToastHandler; + Toast::ToastHandler = new Toast::WinToastHandler; WinToastLib::WinToast::instance()->setAppName(L"IW4x"); WinToastLib::WinToast::instance()->setAppUserModelId(WinToastLib::WinToast::configureAUMI(L"IW4x", L"IW4x", L"IW4x", L"0")); diff --git a/src/Components/Modules/Toast.hpp b/src/Components/Modules/Toast.hpp index fced4813..f3ed65a3 100644 --- a/src/Components/Modules/Toast.hpp +++ b/src/Components/Modules/Toast.hpp @@ -31,12 +31,19 @@ namespace Components int start; }; + class WinToastHandler: public WinToastLib::IWinToastHandler { + public: + void toastActivated() const override {}; + void toastDismissed(WinToastLib::IWinToastHandler::WinToastDismissalReason /*state*/) const override {}; + void toastFailed() const override {}; + }; + static void Handler(); static void Draw(UIToast* toast); static std::queue Queue; static std::mutex Mutex; - static WinToastLib::WinToastHandler* ToastHandler; + static WinToastHandler* ToastHandler; }; }