splash: Select splash image based on native resolution #381
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.
With this PR,
init
will parsefbset
for the currently set native resolution. It will then use a matching splash image if one exists - if not, the 1080 image will be used.Currently this PR is missing a 720p splash image, I'll add one when it becomes available. The size of a 720p PNG splash should be
80KB8KB or less. If not too large (in terms of file size) I may also add a 4K (3840x2160) image.With this PR, the vast majority of native resolutions - 1080p, 720p, and (1024x)768 - will be catered for, and shouldn't need the artwork to be resized by
plymouth-lite
.Any other "corner case" resolutions will use the 1080 artwork, and
plymouth-lite
(with or without bilinear, #353) will resize to the display resolution.Extending this in future to support additional native resolution artwork should be trivial - just add the
splash_<vertical resolution>.png
artwork.As an extra, this PR adds support for
SWITCH_FRAMEBUFFER
, allowing custom frame buffer resolutions to be configured from the command line. For example, addingsetfbres=720
would forcefbset -g 1280 720 1280 720 32
(setfbres=1080
is also supported). An entirely custom resolution can be set with (for example)setfbres=640,480,640,480,32
.