Skip to content

Commit

Permalink
Mark the process as DPI-aware on Windows Vista and above
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanieu committed Jan 14, 2014
1 parent 1b35a36 commit 1e67946
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/engine/sys/sys_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,15 @@ void Sys_PlatformInit( void )

Sys_SetFloatEnv();

// Mark the process as DPI-aware on Vista and above
HMODULE user32 = LoadLibrary("user32.dll");
if (user32) {
FARPROC pSetProcessDPIAware = GetProcAddress(user32, "SetProcessDPIAware");
if (pSetProcessDPIAware)
pSetProcessDPIAware();
FreeLibrary(user32);
}

#if !defined(DEDICATED) && !defined(BUILD_TTY_CLIENT)
if(timeGetDevCaps(&ptc, sizeof(ptc)) == MMSYSERR_NOERROR)
{
Expand Down

0 comments on commit 1e67946

Please sign in to comment.