From afa4efbc8513cbb8565b9700cae48648e3dffe29 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Mon, 2 Mar 2026 23:52:18 +0800 Subject: fix: fix resolution detection (#133) * fix: fix UI skin/scene resolution mismatch and readd screen resolution detection * fix: fix build in vs2022 --- Minecraft.Client/Windows64/Windows64_Minecraft.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'Minecraft.Client/Windows64/Windows64_Minecraft.cpp') diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index d822e943..3268a02b 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -4,6 +4,7 @@ #include "stdafx.h" #include +#include #include "GameConfig\Minecraft.spa.h" #include "..\MinecraftServer.h" #include "..\LocalPlayer.h" @@ -716,20 +717,10 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); - /* - // Declare DPI awareness so GetSystemMetrics returns physical pixels - SetProcessDPIAware(); + SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); g_iScreenWidth = GetSystemMetrics(SM_CXSCREEN); g_iScreenHeight = GetSystemMetrics(SM_CYSCREEN); - { - char buf[128]; - sprintf(buf, "Screen resolution: %dx%d\n", g_iScreenWidth, g_iScreenHeight); - OutputDebugStringA(buf); - } - */ - - if(lpCmdLine) { if(lpCmdLine[0] == '1') -- cgit v1.2.3