From 7e3bdebd77680cd6e474d495f6a8bb27ddac2ecd Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 21:32:42 +0800 Subject: [PATCH] fix: do not use hardcoded screen size --- Minecraft.Client/Common/Consoles_App.cpp | 6 +++--- Minecraft.Client/Common/UI/UIController.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 12aecb3d..24819250 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -6234,7 +6234,7 @@ wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned char ucAction) int size = 30; #elif defined _WIN64 int size = 45; - if(ui.getScreenWidth() < 1920) size = 30; + if(ui.getScreenHeight() < 1080) size = 30; #else int size = 45; #endif @@ -6363,7 +6363,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) int size = 30; #elif defined _WIN64 int size = 45; - if(ui.getScreenWidth() < 1920) size = 30; + if(ui.getScreenHeight() < 1080) size = 30; #else int size = 45; #endif @@ -6394,7 +6394,7 @@ wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon) int size = 22; #elif defined _WIN64 int size = 33; - if(ui.getScreenWidth() < 1920) size = 22; + if(ui.getScreenHeight() < 1080) size = 22; #else int size = 33; #endif diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index 241f6835..8c336088 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -176,7 +176,7 @@ UIController::UIController() #if defined _WINDOWS64 || defined _DURANGO || defined __ORBIS__ m_fScreenWidth = 1920.0f; m_fScreenHeight = 1080.0f; - m_bScreenWidthSetup = true; + m_bScreenWidthSetup = false; #else m_fScreenWidth = 1280.0f; m_fScreenHeight = 720.0f;