diff --git a/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenu.cpp index 6900eae8..6eee2c1a 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadCreateJoinMenu.cpp @@ -2580,19 +2580,16 @@ int UIScene_LoadCreateJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam // check the name is valid if (ui16Text[0] != 0) { -#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined(__PSVITA__)) - // open the save and overwrite the metadata - StorageManager.RenameSaveData(pClass->m_iSaveListIndex, ui16Text, &UIScene_LoadCreateJoinMenu::RenameSaveDataReturned, pClass); -#endif + int displayIdx = pClass->m_iSaveListIndex; + auto pSaveInfo = &pClass->m_pSaveDetails->SaveInfoA[pClass->m_saveDetails[displayIdx].saveId]; + StorageManager.RenameSaveData(pSaveInfo, ui16Text, &UIScene_LoadCreateJoinMenu::RenameSaveDataReturned, pClass); } - else { pClass->m_bIgnoreInput = false; pClass->updateTooltips(); } } - else { pClass->m_bIgnoreInput = false; @@ -3305,21 +3302,18 @@ int UIScene_LoadCreateJoinMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C auto* pClass = static_cast(pParam); // results switched for this dialog - // Check that we have a valid save selected (can get a bad index if the save list has been refreshed) - bool validSelection= pClass->m_iDefaultButtonsC != 0 && pClass->m_iSaveListIndex >= pClass->m_iDefaultButtonsC; - - if(result==C4JStorage::EMessage_ResultDecline && validSelection) + if(result==C4JStorage::EMessage_ResultDecline) { if(app.DebugSettingsOn() && app.GetLoadSavesFromFolderEnabled()) pClass->m_bIgnoreInput=false; else { - int displayIdx = pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC; + int displayIdx = pClass->m_iSaveListIndex; if (pClass->m_saveDetails && displayIdx >= 0 && pClass->m_saveDetails[displayIdx].UTF8SaveFilename[0]) { auto pSaveInfo = &pClass->m_pSaveDetails->SaveInfoA[pClass->m_saveDetails[displayIdx].saveId]; - StorageManager.DeleteSaveData(pSaveInfo, DeleteSaveDataReturned, (LPVOID)pClass->GetCallbackUniqueId()); + StorageManager.DeleteSaveData(pSaveInfo, &UIScene_LoadCreateJoinMenu::DeleteSaveDataReturned, (LPVOID)pClass->GetCallbackUniqueId()); } pClass->m_controlSavesTimer.setVisible( true ); diff --git a/Minecraft.Client/Windows64/4JLibs/inc/4J_Storage.h b/Minecraft.Client/Windows64/4JLibs/inc/4J_Storage.h index b5fb458d..57edb217 100644 --- a/Minecraft.Client/Windows64/4JLibs/inc/4J_Storage.h +++ b/Minecraft.Client/Windows64/4JLibs/inc/4J_Storage.h @@ -292,6 +292,7 @@ public: // Load the save. Need to call GetSaveData once the callback is called ESaveGameState LoadSaveData(PSAVE_INFO pSaveInfo, int (*Func)(LPVOID lpParam, bool, bool), LPVOID lpParam); ESaveGameState DeleteSaveData(PSAVE_INFO pSaveInfo, int (*Func)(LPVOID lpParam, bool), LPVOID lpParam); + ESaveGameState RenameSaveData(PSAVE_INFO pSaveInfo, uint16_t ui16Text, int (*Func)(LPVOID lpParam, bool), LPVOID lpParam); // DLC void RegisterMarketplaceCountsCallback(int (*Func)(LPVOID lpParam, DLC_TMS_DETAILS*, int), LPVOID lpParam); diff --git a/Minecraft.Client/Windows64/4JLibs/libs/4J_Input.lib b/Minecraft.Client/Windows64/4JLibs/libs/4J_Input.lib index f592c329..6e446cf4 100644 Binary files a/Minecraft.Client/Windows64/4JLibs/libs/4J_Input.lib and b/Minecraft.Client/Windows64/4JLibs/libs/4J_Input.lib differ diff --git a/Minecraft.Client/Windows64/4JLibs/libs/4J_Input_d.lib b/Minecraft.Client/Windows64/4JLibs/libs/4J_Input_d.lib index f181f2fa..e01c1cdd 100644 Binary files a/Minecraft.Client/Windows64/4JLibs/libs/4J_Input_d.lib and b/Minecraft.Client/Windows64/4JLibs/libs/4J_Input_d.lib differ diff --git a/Minecraft.Client/Windows64/4JLibs/libs/4J_Profile.lib b/Minecraft.Client/Windows64/4JLibs/libs/4J_Profile.lib index 59a85666..235805da 100644 Binary files a/Minecraft.Client/Windows64/4JLibs/libs/4J_Profile.lib and b/Minecraft.Client/Windows64/4JLibs/libs/4J_Profile.lib differ diff --git a/Minecraft.Client/Windows64/4JLibs/libs/4J_Profile_d.lib b/Minecraft.Client/Windows64/4JLibs/libs/4J_Profile_d.lib index eacc9cec..292e6ce4 100644 Binary files a/Minecraft.Client/Windows64/4JLibs/libs/4J_Profile_d.lib and b/Minecraft.Client/Windows64/4JLibs/libs/4J_Profile_d.lib differ diff --git a/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC.lib b/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC.lib index ab1012ae..4f4e3cd9 100644 Binary files a/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC.lib and b/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC.lib differ diff --git a/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC_d.lib b/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC_d.lib index b7055b39..84c4c843 100644 Binary files a/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC_d.lib and b/Minecraft.Client/Windows64/4JLibs/libs/4J_Render_PC_d.lib differ diff --git a/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage.lib b/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage.lib index 9c9ab06e..edd80c31 100644 Binary files a/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage.lib and b/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage.lib differ diff --git a/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage_d.lib b/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage_d.lib index c6068513..2f38b5d2 100644 Binary files a/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage_d.lib and b/Minecraft.Client/Windows64/4JLibs/libs/4J_Storage_d.lib differ