fix: Display save thumbnail in world detail view on Windows64#1519
Open
dtentiion wants to merge 1 commit intoMCLCE:mainfrom
Open
fix: Display save thumbnail in world detail view on Windows64#1519dtentiion wants to merge 1 commit intoMCLCE:mainfrom
dtentiion wants to merge 1 commit intoMCLCE:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the world detail screen (the menu you see after clicking on a save) not showing the save thumbnail on Windows 64-bit. The save list displayed thumbnails correctly after the 4JLibs upgrade, but clicking on a world showed an empty grey box where the thumbnail should be.
Changes
Previous Behavior
Clicking on a world in the save list opened the detail view with no thumbnail. The grey placeholder was always empty regardless of whether the save had a valid thumbnail in its
thumbnails/thumbData.pngfile. This affected both game-created saves and converted Xbox 360 saves.Root Cause
The
UIScene_LoadMenuconstructor had thumbnail handling code for PS3, Orbis, Durango, and PSVita behind a platform guard at line 202, but no_WINDOWS64path. The existing Win64 block (line 251) only set the world name label and completely ignored the thumbnail data that the save list had already loaded. Them_pbThumbnailDataandm_uiThumbnailSizemembers were also never initialized, leaving them as garbage values.New Behavior
When opening the world detail view, the thumbnail is displayed correctly. If the save list already loaded the thumbnail (via
LoadSaveDataThumbnail), it gets registered as a substitution texture and set on the bitmap icon directly. If the data wasn't loaded yet, the storage lib is called to fetch it. The thumbnail updates on every save, so re-saving a world will show the latest screenshot next time.Fix
UIScene_LoadMenu.cpp- constructor: Added_WINDOWS64thumbnail handling. Converts the save filename to a wide string for use as the texture name. IfsaveDetails->pbThumbnailDatais already populated from the save list, registers it as a substitution texture and sets it onm_bitmapIcondirectly (without going throughm_bSaveThumbnailReady, which would triggerNavigateBackmeant for dismissing the timer loading scene on console platforms). Otherwise falls back toStorageManager.LoadSaveDataThumbnail()to load it from disk. Also initializesm_pbThumbnailDataandm_uiThumbnailSizeto zero to prevent undefined reads.AI Use Disclosure
No AI was used in the development of this pull request.