mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-11 11:43:52 +00:00
fix: Display save thumbnail in world detail view on Windows64 (#1519)
Some checks are pending
Nightly Server Release / build (Windows64) (push) Waiting to run
Nightly Server Release / release (push) Blocked by required conditions
Nightly Server Release / Build and Push Docker Image (push) Blocked by required conditions
Nightly Server Release / cleanup (push) Blocked by required conditions
Nightly Release / build (Windows64) (push) Waiting to run
Nightly Release / release (push) Blocked by required conditions
Nightly Release / cleanup (push) Blocked by required conditions
Some checks are pending
Nightly Server Release / build (Windows64) (push) Waiting to run
Nightly Server Release / release (push) Blocked by required conditions
Nightly Server Release / Build and Push Docker Image (push) Blocked by required conditions
Nightly Server Release / cleanup (push) Blocked by required conditions
Nightly Release / build (Windows64) (push) Waiting to run
Nightly Release / release (push) Blocked by required conditions
Nightly Release / cleanup (push) Blocked by required conditions
This commit is contained in:
parent
9167454767
commit
4a7b34f4c2
1 changed files with 37 additions and 6 deletions
|
|
@ -110,6 +110,8 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
|
|||
m_bThumbnailGetFailed = false;
|
||||
m_seed = 0;
|
||||
m_bIsCorrupt = false;
|
||||
m_pbThumbnailData = nullptr;
|
||||
m_uiThumbnailSize = 0;
|
||||
|
||||
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
|
||||
// 4J-PB - read the settings for the online flag. We'll only save this setting if the user changed it.
|
||||
|
|
@ -249,13 +251,42 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
|
|||
#endif
|
||||
#endif
|
||||
#ifdef _WINDOWS64
|
||||
if (params->saveDetails != nullptr && params->saveDetails->UTF8SaveName[0] != '\0')
|
||||
if (params->saveDetails != nullptr)
|
||||
{
|
||||
wchar_t wSaveName[128];
|
||||
ZeroMemory(wSaveName, sizeof(wSaveName));
|
||||
mbstowcs(wSaveName, params->saveDetails->UTF8SaveName, 127);
|
||||
m_levelName = wstring(wSaveName);
|
||||
m_labelGameName.init(m_levelName);
|
||||
if (params->saveDetails->UTF8SaveName[0] != '\0')
|
||||
{
|
||||
wchar_t wSaveName[128];
|
||||
ZeroMemory(wSaveName, sizeof(wSaveName));
|
||||
mbstowcs(wSaveName, params->saveDetails->UTF8SaveName, 127);
|
||||
m_levelName = wstring(wSaveName);
|
||||
m_labelGameName.init(m_levelName);
|
||||
}
|
||||
|
||||
wchar_t wFilename[MAX_SAVEFILENAME_LENGTH];
|
||||
ZeroMemory(wFilename, sizeof(wFilename));
|
||||
mbstowcs(wFilename, params->saveDetails->UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH - 1);
|
||||
m_thumbnailName = wFilename;
|
||||
|
||||
if (params->saveDetails->pbThumbnailData && params->saveDetails->dwThumbnailSize > 0)
|
||||
{
|
||||
// save list already loaded this, register and display it
|
||||
registerSubstitutionTexture(wFilename, params->saveDetails->pbThumbnailData, params->saveDetails->dwThumbnailSize);
|
||||
m_bitmapIcon.setTextureName(wFilename);
|
||||
m_pbThumbnailData = params->saveDetails->pbThumbnailData;
|
||||
m_uiThumbnailSize = params->saveDetails->dwThumbnailSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
// ask the storage lib to load it
|
||||
PSAVE_DETAILS pSaveDetails = StorageManager.ReturnSavesInfo();
|
||||
if (pSaveDetails)
|
||||
{
|
||||
StorageManager.LoadSaveDataThumbnail(
|
||||
&pSaveDetails->SaveInfoA[(int)m_iSaveGameInfoIndex],
|
||||
&LoadSaveDataThumbnailReturned, (LPVOID)GetCallbackUniqueId());
|
||||
}
|
||||
}
|
||||
m_bRetrievingSaveThumbnail = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue