aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
diff options
context:
space:
mode:
authorvoid_17 <61356189+void2012@users.noreply.github.com>2026-03-02 23:01:57 +0700
committerGitHub <noreply@github.com>2026-03-02 23:01:57 +0700
commit7ad6102763131a617d564dbf2d778612ba5046df (patch)
tree206124db2534867804a061879d764823c92ceccb /Minecraft.Client/Windows64/Windows64_Minecraft.cpp
parent5c3040affe96b015c6c7c03b41a9b842c1a95090 (diff)
Revert "Revert "fix: fix resolution detection (#133)" (#143)" (#144)
This reverts commit 8c18926d5911343975604b93c51efbcd926c133a.
Diffstat (limited to 'Minecraft.Client/Windows64/Windows64_Minecraft.cpp')
-rw-r--r--Minecraft.Client/Windows64/Windows64_Minecraft.cpp13
1 files changed, 2 insertions, 11 deletions
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 <assert.h>
+#include <ShellScalingApi.h>
#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')