From 637bcf7702ef413970878c684cfcefd9dcca3ad6 Mon Sep 17 00:00:00 2001 From: Frcoxd Date: Tue, 21 Apr 2026 00:38:41 -0300 Subject: [PATCH] Fix: Fixed the double press sound on more options againg on the loadmenu and create world menu and fix the bug where the save thumbnail wasn't displaying correctly in loadmenu --- .../Common/UI/UIScene_CreateWorldMenu.cpp | 5 ++--- Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp | 16 +++++++--------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp index 85d8ee26..3aa18d3b 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp @@ -437,9 +437,6 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) if (isDirectEditBlocking()) return; #endif - //CD - Added for audio - ui.PlayUISFX(eSFX_Press); - switch(static_cast(controlId)) { case eControl_EditWorldName: @@ -492,11 +489,13 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) break; case eControl_TexturePackList: { + ui.PlayUISFX(eSFX_Press); UpdateCurrentTexturePack(static_cast(childId)); } break; case eControl_NewWorld: { + ui.PlayUISFX(eSFX_Press); #ifdef _DURANGO if(m_MoreOptionsParams.bOnlineGame) { diff --git a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp index 82f0400b..3a5fb128 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp @@ -267,11 +267,10 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye } if (params->saveDetails != nullptr) { - // Set thumbnail name from save filename (needed for texture display in tick) - wchar_t wFilename[MAX_SAVEFILENAME_LENGTH]; - ZeroMemory(wFilename, sizeof(wFilename)); - mbstowcs(wFilename, params->saveDetails->UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1); - m_thumbnailName = wFilename; + // Use a stable texture key for saves so the icon survives save/quit refreshes. + wchar_t textureName[64]; + swprintf(textureName, 64, L"loadsave_large_%08x", m_iSaveGameInfoIndex); + m_thumbnailName = textureName; if (params->saveDetails->pbThumbnailData && params->saveDetails->dwThumbnailSize > 0) { @@ -742,9 +741,6 @@ void UIScene_LoadMenu::handlePress(F64 controlId, F64 childId) { if(m_bIgnoreInput) return; - //CD - Added for audio - ui.PlayUISFX(eSFX_Press); - switch(static_cast(controlId)) { // case eControl_GameMode: @@ -776,11 +772,13 @@ void UIScene_LoadMenu::handlePress(F64 controlId, F64 childId) break; case eControl_TexturePackList: { + ui.PlayUISFX(eSFX_Press); UpdateCurrentTexturePack(static_cast(childId)); } break; case eControl_LoadWorld: { + ui.PlayUISFX(eSFX_Press); #ifdef _DURANGO if(m_MoreOptionsParams.bOnlineGame) { @@ -1962,4 +1960,4 @@ int UIScene_LoadMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EM // pClass->m_bIgnoreInput=false; // return 0; // } -#endif \ No newline at end of file +#endif