diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-07-08 02:11:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-07-08 02:11:11 +0400 |
commit | 1d822b1cda135652125c57edc29f4167f1980912 (patch) | |
tree | 66744d0387d931d3fd801bc1286832c2c05f283a /intern/ghost | |
parent | e341586f9d4b2f7dec633217bf613a8b5e50f060 (diff) |
patch from res2k to stop the blender window being upscaled on vista.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index 82a76b3c706..293f8fc1661 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -302,6 +302,15 @@ GHOST_TSuccess GHOST_SystemWin32::init() { GHOST_TSuccess success = GHOST_System::init(); + /* Disable scaling on high DPI displays on Vista */ + HMODULE user32 = ::LoadLibraryA("user32.dll"); + typedef BOOL (WINAPI * LPFNSETPROCESSDPIAWARE)(); + LPFNSETPROCESSDPIAWARE SetProcessDPIAware = + (LPFNSETPROCESSDPIAWARE)GetProcAddress(user32, "SetProcessDPIAware"); + if (SetProcessDPIAware) + SetProcessDPIAware(); + FreeLibrary(user32); + // Determine whether this system has a high frequency performance counter. */ m_hasPerformanceCounter = ::QueryPerformanceFrequency((LARGE_INTEGER*)&m_freq) == TRUE; if (m_hasPerformanceCounter) { |