mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 08:50:15 +00:00
Added setting of Windows DPI-aware flag.
This commit is contained in:
@@ -79,6 +79,13 @@ static GLboolean initLibraries(void)
|
||||
}
|
||||
#endif // _GLFW_NO_DLOAD_WINMM
|
||||
|
||||
_glfw.win32.user32.instance = LoadLibrary(L"user32.dll");
|
||||
if (_glfw.win32.user32.instance)
|
||||
{
|
||||
_glfw.win32.user32.SetProcessDPIAware = (SETPROCESSDPIAWARE_T)
|
||||
GetProcAddress(_glfw.win32.user32.instance, "SetProcessDPIAware");
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
@@ -162,6 +169,9 @@ int _glfwPlatformInit(void)
|
||||
if (!initLibraries())
|
||||
return GL_FALSE;
|
||||
|
||||
if (_glfw_SetProcessDPIAware)
|
||||
_glfw_SetProcessDPIAware();
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
// With the Borland C++ compiler, we want to disable FPU exceptions
|
||||
// (this is recommended for OpenGL applications under Windows)
|
||||
|
||||
Reference in New Issue
Block a user