mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 08:50:15 +00:00
+13
-1
@@ -99,6 +99,13 @@ static GLFWbool initLibraries(void)
|
||||
GetProcAddress(_glfw.win32.dwmapi.instance, "DwmFlush");
|
||||
}
|
||||
|
||||
_glfw.win32.shcore.instance = LoadLibraryW(L"shcore.dll");
|
||||
if (_glfw.win32.shcore.instance)
|
||||
{
|
||||
_glfw.win32.shcore.SetProcessDPIAwareness = (SETPROCESSDPIAWARENESS_T)
|
||||
GetProcAddress(_glfw.win32.shcore.instance, "SetProcessDPIAwareness");
|
||||
}
|
||||
|
||||
return GLFW_TRUE;
|
||||
}
|
||||
|
||||
@@ -114,6 +121,9 @@ static void terminateLibraries(void)
|
||||
|
||||
if (_glfw.win32.dwmapi.instance)
|
||||
FreeLibrary(_glfw.win32.dwmapi.instance);
|
||||
|
||||
if (_glfw.win32.shcore.instance)
|
||||
FreeLibrary(_glfw.win32.shcore.instance);
|
||||
}
|
||||
|
||||
// Create key code translation tables
|
||||
@@ -328,7 +338,9 @@ int _glfwPlatformInit(void)
|
||||
|
||||
createKeyTables();
|
||||
|
||||
if (_glfw_SetProcessDPIAware)
|
||||
if (_glfw_SetProcessDPIAwareness)
|
||||
_glfw_SetProcessDPIAwareness(PROCESS_PER_MONITOR_DPI_AWARE);
|
||||
else if (_glfw_SetProcessDPIAware)
|
||||
_glfw_SetProcessDPIAware();
|
||||
|
||||
if (!_glfwRegisterWindowClass())
|
||||
|
||||
Reference in New Issue
Block a user