aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.Client/Windows64/Windows64_Minecraft.cpp')
-rw-r--r--Minecraft.Client/Windows64/Windows64_Minecraft.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
index cc589771..472d10a6 100644
--- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
+++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp
@@ -698,6 +698,17 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
+ // Declare DPI awareness so GetSystemMetrics returns physical pixels
+ SetProcessDPIAware();
+ 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')