[Submodules] Update WinToast and libtomcrypt
This commit is contained in:
parent
4fa755e351
commit
221e550180
2
deps/WinToast
vendored
2
deps/WinToast
vendored
@ -1 +1 @@
|
||||
Subproject commit 3dd4823791c447b14e8eacd67487a953f1ecf98a
|
||||
Subproject commit 2a35d367c54e34c8beef62c2a0b1022688a2b8cc
|
2
deps/libtomcrypt
vendored
2
deps/libtomcrypt
vendored
@ -1 +1 @@
|
||||
Subproject commit 08cc78007b95fc52e3d2eac86950fa1fd811c1a4
|
||||
Subproject commit 4efe22972671ae6e8d9878d56f0e77c0daef7230
|
@ -5,7 +5,7 @@ namespace Components
|
||||
std::queue<Toast::UIToast> 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"));
|
||||
|
@ -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<UIToast> Queue;
|
||||
static std::mutex Mutex;
|
||||
|
||||
static WinToastLib::WinToastHandler* ToastHandler;
|
||||
static WinToastHandler* ToastHandler;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user