mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-18 01:15:26 +00:00
Windows sync
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
#include <winver.h>
|
||||
#include <Dbt.h>
|
||||
|
||||
#if _WIN32_WINNT_WINBLUE
|
||||
PFN_GetScaleFactorForMonitor MyGetScaleFactorForMonitor = nullptr;
|
||||
#endif
|
||||
|
||||
#if _DEBUG
|
||||
#define D3D11_CREATE_DEVICE_FLAGS D3D11_CREATE_DEVICE_DEBUG
|
||||
#else
|
||||
@@ -453,6 +457,21 @@ int ApplicationRun(IApplication::EPlatformType platform,
|
||||
platform != IApplication::EPlatformType::Auto)
|
||||
return 1;
|
||||
|
||||
#if _WIN32_WINNT_WINBLUE
|
||||
/* HI-DPI support */
|
||||
HMODULE shcoreLib = LoadLibraryW(L"Shcore.dll");
|
||||
if (shcoreLib)
|
||||
{
|
||||
PFN_SetProcessDpiAwareness MySetProcessDpiAwareness =
|
||||
(PFN_SetProcessDpiAwareness)GetProcAddress(shcoreLib, "SetProcessDpiAwareness");
|
||||
if (MySetProcessDpiAwareness)
|
||||
MySetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE);
|
||||
|
||||
MyGetScaleFactorForMonitor =
|
||||
(PFN_GetScaleFactorForMonitor)GetProcAddress(shcoreLib, "GetScaleFactorForMonitor");
|
||||
}
|
||||
#endif
|
||||
|
||||
WIN32_CURSORS.m_arrow = LoadCursor(nullptr, IDC_ARROW);
|
||||
WIN32_CURSORS.m_hResize = LoadCursor(nullptr, IDC_SIZEWE);
|
||||
WIN32_CURSORS.m_vResize = LoadCursor(nullptr, IDC_SIZENS);
|
||||
|
||||
Reference in New Issue
Block a user