mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Don't load SetCurrentProcessExplicitAppUserModelID dynamically
It's supported since Windows 7
This commit is contained in:
parent
8c9014fcf6
commit
47195e316f
3 changed files with 2 additions and 9 deletions
|
@ -107,11 +107,7 @@ crl::time LastSettingsQueryMs/* = 0*/;
|
|||
}
|
||||
|
||||
bool init() {
|
||||
if (!IsWindows8OrGreater()) {
|
||||
return false;
|
||||
}
|
||||
if ((Dlls::SetCurrentProcessExplicitAppUserModelID == nullptr)
|
||||
|| !base::WinRT::Supported()) {
|
||||
if (!IsWindows8OrGreater() || !base::WinRT::Supported()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -128,7 +124,7 @@ bool init() {
|
|||
}
|
||||
|
||||
auto appUserModelId = AppUserModelId::getId();
|
||||
if (!SUCCEEDED(Dlls::SetCurrentProcessExplicitAppUserModelID(appUserModelId))) {
|
||||
if (!SUCCEEDED(SetCurrentProcessExplicitAppUserModelID(appUserModelId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -34,7 +34,6 @@ SafeIniter::SafeIniter() {
|
|||
LOAD_SYMBOL(LibShell32, OpenAs_RunDLL);
|
||||
LOAD_SYMBOL(LibShell32, SHQueryUserNotificationState);
|
||||
LOAD_SYMBOL(LibShell32, SHChangeNotify);
|
||||
LOAD_SYMBOL(LibShell32, SetCurrentProcessExplicitAppUserModelID);
|
||||
|
||||
//if (IsWindows10OrGreater()) {
|
||||
// static const auto kSystemVersion = QOperatingSystemVersion::current();
|
||||
|
|
|
@ -65,8 +65,6 @@ inline void(__stdcall *SHChangeNotify)(
|
|||
UINT uFlags,
|
||||
__in_opt LPCVOID dwItem1,
|
||||
__in_opt LPCVOID dwItem2);
|
||||
inline HRESULT(__stdcall *SetCurrentProcessExplicitAppUserModelID)(
|
||||
__in PCWSTR AppID);
|
||||
|
||||
// PROPSYS.DLL
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue