From dc342c092dc07a4698b2438e54fd61581d2475dd Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Wed, 11 Mar 2026 00:12:24 +1100 Subject: [PATCH] Remove Win32 wide char aliases from DLC UI flows --- Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp | 4 ++-- .../Platform/Common/UI/UIScene_DLCOffersMenu.cpp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp index 14e4a79c1..18eeccd99 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp @@ -58,7 +58,7 @@ void IUIScene_StartGame::HandleDLCMountingComplete() char *pchName=app.GetDLCInfoTextures(i); pDLCInfo=app.GetDLCInfo(pchName); #elif defined _XBOX_ONE - pDLCInfo=app.GetDLCInfoForFullOfferID((WCHAR *)app.GetDLCInfoTexturesFullOffer(i).c_str()); + pDLCInfo=app.GetDLCInfoForFullOfferID(const_cast(app.GetDLCInfoTexturesFullOffer(i).c_str())); #else ULONGLONG ull=app.GetDLCInfoTexturesFullOffer(i); pDLCInfo=app.GetDLCInfoForFullOfferID(ull); @@ -362,7 +362,7 @@ int IUIScene_StartGame::TexturePackDialogReturned(void *pParam,int iPad,C4JStora app.GetDLCFullOfferIDForPackID(pClass->m_MoreOptionsParams.dwTexturePack,ProductId); - StorageManager.InstallOffer(1,(WCHAR *)ProductId.c_str(),NULL,NULL); + StorageManager.InstallOffer(1, const_cast(ProductId.c_str()), NULL, NULL); // the license change coming in when the offer has been installed will cause this scene to refresh } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp index d52f888e7..ebbbe505a 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp @@ -738,8 +738,7 @@ void UIScene_DLCOffersMenu::GetDLCInfo( int iOfferC, bool bUpdateOnly ) if(wcsncmp(L"Minecraft ",wstrTemp.c_str(),10)==0) { app.DebugPrintf("Removing Minecraft from name\n"); - WCHAR *pwchNewName=(WCHAR *)wstrTemp.c_str(); - wstrTemp=&pwchNewName[10]; + wstrTemp = wstrTemp.substr(10); } #ifdef _XBOX_ONE @@ -822,7 +821,7 @@ bool UIScene_DLCOffersMenu::UpdateDisplay(MARKETPLACE_CONTENTOFFER_INFO& xOffer) if (dlc != NULL) { - WCHAR *cString = dlc->wchBanner; + wchar_t *cString = dlc->wchBanner; // is the file in the local DLC images?