Cache background URLs for instant background on game switch#896
Open
shatyuka wants to merge 7 commits into
Open
Cache background URLs for instant background on game switch#896shatyuka wants to merge 7 commits into
shatyuka wants to merge 7 commits into
Conversation
shatyuka
marked this pull request as ready for review
July 22, 2026 16:01
Comment on lines
+134
to
+138
| bool willDisplayStatic = !IsVideoMediaFileExtensionSupported(primaryBg ?? staticBgUrl!) || | ||
| (!CurrentIsEnableCustomImage && | ||
| !GlobalIsEnableCustomImage && | ||
| !CurrentIsEnableBackgroundAutoPlay); | ||
| Uri accentPreviewUri = willDisplayStatic ? new Uri(localStatic) : new Uri(localBackground); |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Comment on lines
+379
to
+383
| Color syncColor = Task.Run(async () => | ||
| await ColorPaletteUtility.GetMediaAccentColorFromAsync(fallbackSourceUri, false) | ||
| ).GetAwaiter().GetResult(); | ||
| ThemeRootElement.ChangeAccentColor(syncColor); | ||
| LauncherConfig.SetAndSaveConfigValue($"{cachedBgKey}-AccentColor", |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| ImageSource = new BitmapImage(new Uri(placeholderPath)), | ||
| Stretch = Stretch.UniformToFill | ||
| }; | ||
| PresenterGrid.Children.Clear(); |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
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.
Main Goal
Cache background image URLs to config and preload background before region loading, so the cached or preset background appears instantly on game switch without waiting for API download.
If the background files are cached locally, the background is displayed immediately. If not cached, the game-specific preset placeholder is shown while the real background downloads in the background.
Games added via plugins have not yet been tested.
PR Status :