summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormikalair <mikalair@outlook.com>2017-08-23 17:40:30 +0300
committermikalair <mikalair@outlook.com>2017-08-23 17:40:30 +0300
commit0174b54e00f5b2a9693e0b1ab0a4f569ff517a3a (patch)
tree5ec3db389c0c932226c40ae98178ea4d86da17f3
parent33afeb0cfcf57556fcacd9933a9fbbce5ba1cc02 (diff)
fix xp support
-rw-r--r--src/mir_app/src/modules.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mir_app/src/modules.cpp b/src/mir_app/src/modules.cpp
index 46892c6837..ff9117276b 100644
--- a/src/mir_app/src/modules.cpp
+++ b/src/mir_app/src/modules.cpp
@@ -94,9 +94,15 @@ int LoadDefaultModules(void)
// load database drivers & service plugins without executing their Load()
if (LoadNewPluginsModuleInfos()) return 1;
- if (GetPrivateProfileInt(L"Interface", L"DpiAware", 0, mirandabootini) == 1)
- SetProcessDPIAware();
+ if (GetPrivateProfileInt(L"Interface", L"DpiAware", 0, mirandabootini) == 1) {
+ typedef BOOL (WINAPI * SetProcessDPIAware_t)(void);
+ SetProcessDPIAware_t pfn = (SetProcessDPIAware_t)GetProcAddress(GetModuleHandleW(L"user32"), "SetProcessDPIAware");
+ if (pfn != nullptr) {
+ pfn();
+ }
+ }
+
switch (LoadDefaultServiceModePlugin()) {
case SERVICE_CONTINUE: // continue loading Miranda normally
case SERVICE_ONLYDB: // load database and go to the message cycle