Call SetProcessDPIAware

This commit is contained in:
Jeff Stamerjohn 2022-01-29 12:52:45 -09:00
parent 433126e7a1
commit 367beb52cd
3 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,7 @@ int WINAPI
WinMain(HINSTANCE, HINSTANCE, LPSTR, int) WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{ {
DaemonApp app; DaemonApp app;
SetProcessDPIAware();
return app.run(__argc, __argv); return app.run(__argc, __argv);
} }

View File

@ -138,6 +138,8 @@ AppUtilWindows::run(int argc, char** argv)
throw std::runtime_error("Barrier only supports Windows XP SP3 and above."); throw std::runtime_error("Barrier only supports Windows XP SP3 and above.");
} }
SetProcessDPIAware();
// record window instance for tray icon, etc // record window instance for tray icon, etc
ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL)); ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));

View File

@ -84,6 +84,7 @@ DaemonApp::~DaemonApp()
int int
DaemonApp::run(int argc, char** argv) DaemonApp::run(int argc, char** argv)
{ {
SetProcessDPIAware();
// win32 instance needed for threading, etc. // win32 instance needed for threading, etc.
ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL)); ArchMiscWindows::setInstanceWin32(GetModuleHandle(NULL));