From 9efc49d590fd1c76b5ce227de413d55fc6e7f239 Mon Sep 17 00:00:00 2001 From: str1k3r <115313679+S1l3ntStr1ke87@users.noreply.github.com> Date: Sat, 26 Sep 2026 13:05:44 -0400 Subject: [PATCH] chore: bring over some cafeberry fixes --- Minecraft.Client/Common/BuildVer.h | 8 +++---- Minecraft.Client/Common/Consoles_App.cpp | 24 ++++++++++++++----- Minecraft.Client/Common/UI/UIController.cpp | 12 +++++++++- .../Windows64/Windows64_Minecraft.cpp | 24 +++++++++++++++---- 4 files changed, 53 insertions(+), 15 deletions(-) diff --git a/Minecraft.Client/Common/BuildVer.h b/Minecraft.Client/Common/BuildVer.h index ee558b03..c72bbb72 100644 --- a/Minecraft.Client/Common/BuildVer.h +++ b/Minecraft.Client/Common/BuildVer.h @@ -7,14 +7,14 @@ // This goes up with each build // 4J-JEV: This value is extracted with a regex so it can be placed as the version in the AppX manifest on Durango. -#define VER_PRODUCTBUILD 495 +#define VER_PRODUCTBUILD 62 // This goes up if there is any change to network traffic or code in a build -#define VER_NETWORK 495 +#define VER_NETWORK 62 #define VER_PRODUCTBUILD_QFE 0 -#define VER_FILEVERSION_STRING "1.3" +#define VER_FILEVERSION_STRING "0.66" #define VER_PRODUCTVERSION_STRING VER_FILEVERSION_STRING -#define VER_FILEVERSION_STRING_W L"1.3" +#define VER_FILEVERSION_STRING_W L"0.66" #define VER_PRODUCTVERSION_STRING_W VER_FILEVERSION_STRING_W #define VER_FILEBETA_STR "" #undef VER_FILEVERSION diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp index 12aecb3d..37a776c1 100644 --- a/Minecraft.Client/Common/Consoles_App.cpp +++ b/Minecraft.Client/Common/Consoles_App.cpp @@ -6233,8 +6233,12 @@ wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned char ucAction) #ifdef __PS3__ int size = 30; #elif defined _WIN64 - int size = 45; - if(ui.getScreenWidth() < 1920) size = 30; + int size = 30; + + if(ui.getScreenWidth() >= 1920) + { + size = 45; + } #else int size = 45; #endif @@ -6362,8 +6366,12 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) #ifdef __PS3__ int size = 30; #elif defined _WIN64 - int size = 45; - if(ui.getScreenWidth() < 1920) size = 30; + int size = 30; + + if(ui.getScreenWidth() >= 1920) + { + size = 45; + } #else int size = 45; #endif @@ -6393,8 +6401,12 @@ wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon) #ifdef __PS3__ int size = 22; #elif defined _WIN64 - int size = 33; - if(ui.getScreenWidth() < 1920) size = 22; + int size = 22; + + if(ui.getScreenWidth() >= 1920) + { + size = 33; + } #else int size = 33; #endif diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp index 51a1137f..d8ce4c83 100644 --- a/Minecraft.Client/Common/UI/UIController.cpp +++ b/Minecraft.Client/Common/UI/UIController.cpp @@ -1347,10 +1347,20 @@ GDrawTexture * RADLINK UIController::TextureSubstitutionCreateCallback ( void * #if (defined __ORBIS__ || defined _DURANGO ) *width = 96; *height = 96; + #elif _WINDOWS64 + if(ui.getScreenWidth() >= 1920) + { + *width = 96; + *height = 96; + } + else + { + *width = 64; + *height = 64; + } #else *width = 64; *height = 64; - #endif *destroy_callback_data = (void *)id; diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index d2251e4e..4d0c738b 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -939,7 +939,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, app.UpdateTime(); PIXBeginNamedEvent(0,"Input manager tick"); - InputManager.Tick(); + if (GetFocus()) InputManager.Tick(); PIXEndNamedEvent(); PIXBeginNamedEvent(0,"Profile manager tick"); // ProfileManager.Tick(); @@ -1160,9 +1160,25 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, Vec3::resetPool(); } - // Free resources, unregister custom classes, and exit. - // app.Uninit(); - g_pd3dDevice->Release(); + //str1k3r - shutdown server & network manager + MinecraftServer::HaltServer(); + g_NetworkManager.Terminate(); + + //str1k3r - unregister the minecraft window class + UnregisterClass("MinecraftClass", g_hInst); + + //str1k3r - shutdown Iggy + ui.shutdown(); + IggyShutdown(); + + //str1k3r - shutdown mss :3 + AIL_shutdown(); + + //str1k3r - cleanup DirectX stuff + CleanupDevice(); + + //str1k3r - pass exitcode to OS + return (int)msg.wParam; } #ifdef MEMORY_TRACKING