From 669e75701bec4055f9630923ce901af5125c1580 Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Fri, 13 Mar 2026 00:33:23 -0500 Subject: [PATCH] fix: hack around DLC loading to get ingame --- .../Common/Network/GameNetworkManager.cpp | 8 ++++---- .../Platform/Common/UI/UIScene_Intro.cpp | 14 +++++++------- .../Common/UI/UIScene_LoadOrJoinMenu.cpp | 4 ++-- .../Platform/Common/UI/UIScene_MainMenu.cpp | 18 +++++++++--------- .../Platform/Common/UI/UIStructs.h | 1 - .../Platform/Linux/Linux_Minecraft.cpp | 4 +--- .../Platform/Linux/Linux_UIController.cpp | 14 +++++--------- 7 files changed, 28 insertions(+), 35 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp index 84cdf7740..51def8163 100644 --- a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp @@ -272,10 +272,10 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, void *lpParamet app.DebugPrintf("[NET] DLC check: completed=%d pending=%d\n", app.DLCInstallProcessCompleted(), app.DLCInstallPending()); // 4J Stu - Wait a while to make sure that DLC is loaded. This is the last point before the network communication starts // so the latest we can check this - while( !app.DLCInstallProcessCompleted() && app.DLCInstallPending() && !g_NetworkManager.IsLeavingGame() ) - { - Sleep( 10 ); - } + // while( !app.DLCInstallProcessCompleted() && app.DLCInstallPending() && !g_NetworkManager.IsLeavingGame() ) + // { + // Sleep( 10 ); + // } if( g_NetworkManager.IsLeavingGame() ) { MinecraftServer::HaltServer(); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_Intro.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_Intro.cpp index 7e6bb2b1e..701f88a30 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_Intro.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_Intro.cpp @@ -182,12 +182,12 @@ void UIScene_Intro::tick() // Auto-skip the intro after 60 ticks (~2 seconds at 30fps) // since we have no SWF renderer to play the intro animation s_introTickCount++; - if(s_introTickCount == 60 && !m_bIgnoreNavigate) - { - fprintf(stderr, "[Linux] Auto-skipping intro -> MainMenu after %d ticks\n", s_introTickCount); - m_bIgnoreNavigate = true; - // Skip straight to MainMenu, bypassing SaveMessage (no SWF interaction possible) - ui.NavigateToScene(0, eUIScene_MainMenu); - } + // if(s_introTickCount == 60 && !m_bIgnoreNavigate) + // { + // fprintf(stderr, "[Linux] Auto-skipping intro -> MainMenu after %d ticks\n", s_introTickCount); + // m_bIgnoreNavigate = true; + // // Skip straight to MainMenu, bypassing SaveMessage (no SWF interaction possible) + // ui.NavigateToScene(0, eUIScene_MainMenu); + // } } #endif \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp index a5cea82fb..2f59c23ce 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp @@ -955,10 +955,10 @@ void UIScene_LoadOrJoinMenu::AddDefaultButtons() void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled) { - if(m_bIgnoreInput) return; + // if(m_bIgnoreInput) return; // if we're retrieving save info, ignore key presses - if(!m_bSavesDisplayed) return; + // if(!m_bSavesDisplayed) return; ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp index 78a9b592e..41ca58f9e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp @@ -1804,15 +1804,15 @@ void UIScene_MainMenu::tick() #ifdef __linux__ { - static int s_mainMenuTickCount = 0; - s_mainMenuTickCount++; - if(s_mainMenuTickCount % 60 == 1) { fprintf(stderr, "[MM] tick %d\n", s_mainMenuTickCount); fflush(stderr); } - if(s_mainMenuTickCount == 90) // ~3 seconds at 30fps - { - fprintf(stderr, "[Linux] Auto-starting trial world from MainMenu after %d ticks\n", s_mainMenuTickCount); - LoadTrial(); - return; - } + // static int s_mainMenuTickCount = 0; + // s_mainMenuTickCount++; + // if(s_mainMenuTickCount % 60 == 1) { fprintf(stderr, "[MM] tick %d\n", s_mainMenuTickCount); fflush(stderr); } + // if(s_mainMenuTickCount == 90) // ~3 seconds at 30fps + // { + // fprintf(stderr, "[Linux] Auto-starting trial world from MainMenu after %d ticks\n", s_mainMenuTickCount); + // LoadTrial(); + // return; + // } } #endif diff --git a/Minecraft.Client/Platform/Common/UI/UIStructs.h b/Minecraft.Client/Platform/Common/UI/UIStructs.h index 018be49be..79bc42d4d 100644 --- a/Minecraft.Client/Platform/Common/UI/UIStructs.h +++ b/Minecraft.Client/Platform/Common/UI/UIStructs.h @@ -267,7 +267,6 @@ typedef struct _LaunchMoreOptionsMenuInitData _LaunchMoreOptionsMenuInitData() { - memset((void*)this,0,sizeof(_LaunchMoreOptionsMenuInitData)); bOnlineGame = true; bAllowFriendsOfFriends = true; bPVP = true; diff --git a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp index 14729679c..c25f86e45 100644 --- a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp +++ b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp @@ -783,11 +783,9 @@ g_NetworkManager.DoWork(); PIXEndNamedEvent(); // Render game graphics. -// On Linux, always call run_middle() so mc->screen (TitleScreen etc.) renders -// even when the game session has not yet started (Iggy Flash UI is unavailable). -pMinecraft->run_middle(); if(app.GetGameStarted()) { + pMinecraft->run_middle(); app.SetAppPaused( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 && ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad()) ); } else diff --git a/Minecraft.Client/Platform/Linux/Linux_UIController.cpp b/Minecraft.Client/Platform/Linux/Linux_UIController.cpp index d28ff938f..38d49a582 100644 --- a/Minecraft.Client/Platform/Linux/Linux_UIController.cpp +++ b/Minecraft.Client/Platform/Linux/Linux_UIController.cpp @@ -24,18 +24,14 @@ void ConsoleUIController::init(S32 w, S32 h) if (!gdraw_funcs) { app.DebugPrintf("Failed to initialise GDraw GL!\n"); - fprintf(stderr, "[Linux_UIController] Failed to initialise GDraw GL!\n"); - // nott fatal for now + app.FatalLoadError(); } - else - { - gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_vertexbuffer, 5000, 16 * 1024 * 1024); - gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_texture, 5000, 128 * 1024 * 1024); - gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_rendertarget, 10, 32 * 1024 * 1024); + gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_vertexbuffer, 5000, 16 * 1024 * 1024); + gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_texture, 5000, 128 * 1024 * 1024); + gdraw_GL_SetResourceLimits(GDRAW_GL_RESOURCE_rendertarget, 10, 32 * 1024 * 1024); - IggySetGDraw(gdraw_funcs); - } + IggySetGDraw(gdraw_funcs); postInit(); #endif