This commit is contained in:
test123456654321 2024-10-27 14:58:56 +08:00
parent ccf52b9663
commit b33fbd86f2
2 changed files with 3 additions and 3 deletions

View File

@ -28,8 +28,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/version)
include(generate_product_version)
set(VERSION_MAJOR 5)
set(VERSION_MINOR 50)
set(VERSION_PATCH 5)
set(VERSION_MINOR 51)
set(VERSION_PATCH 0)
add_library(pch pch.cpp)
target_precompile_headers(pch PUBLIC pch.h)

View File

@ -101,7 +101,7 @@ DECLARE UINT GetMonitorDpiScaling(HWND hwnd)
HMONITOR hMonitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
if (!hMonitor)
return 96;
auto pGetDpiForMonitor = (HRESULT(*)(HMONITOR, MONITOR_DPI_TYPE, UINT *, UINT *))GetProcAddress(GetModuleHandleA("Shcore.dll"), "GetDpiForMonitor");
auto pGetDpiForMonitor = (HRESULT(STDAPICALLTYPE *)(HMONITOR, MONITOR_DPI_TYPE, UINT *, UINT *))GetProcAddress(GetModuleHandleA("Shcore.dll"), "GetDpiForMonitor");
if (pGetDpiForMonitor)
{
UINT dpiX = 0;