From ce2efc1a4da9864910b148fdf3670d850b4a971d Mon Sep 17 00:00:00 2001 From: itsRevela Date: Fri, 17 Apr 2026 07:07:02 -0500 Subject: [PATCH] fix: crash when opening UI scenes at sub-720p window size SWF movie loading crashed with __debugbreak when the window height was below 720px (e.g. after leaving exclusive fullscreen). The fallback chain only tried 720.swf which doesn't exist. Now falls back through 720 -> 1080 so scenes always find a valid SWF. --- Minecraft.Client/Common/UI/UIScene.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp index b29a7e56..02137d13 100644 --- a/Minecraft.Client/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Common/UI/UIScene.cpp @@ -310,19 +310,27 @@ void UIScene::loadMovie() if(!app.hasArchiveFile(moviePath)) { - app.DebugPrintf("WARNING: Could not find iggy movie %ls, falling back on 720\n", moviePath.c_str()); + app.DebugPrintf("WARNING: Could not find iggy movie %ls, trying other resolutions\n", moviePath.c_str()); + // Try 720 first, then 1080 as final fallback moviePath = getMoviePath(); moviePath.append(L"720.swf"); m_loadedResolution = eSceneResolution_720; if(!app.hasArchiveFile(moviePath)) { - app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n", moviePath.c_str()); + moviePath = getMoviePath(); + moviePath.append(L"1080.swf"); + m_loadedResolution = eSceneResolution_1080; + + if(!app.hasArchiveFile(moviePath)) + { + app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n", moviePath.c_str()); #ifndef _CONTENT_PACKAGE - __debugbreak(); + __debugbreak(); #endif - app.FatalLoadError(); + app.FatalLoadError(); + } } }