Merge pull request #96197 from jsjtxietian/splash-msg

Improve error message when loading non-PNG splash image
This commit is contained in:
Rémi Verschelde 2024-08-29 10:36:38 +02:00
commit 8186fabc8f
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -3394,7 +3394,8 @@ void Main::setup_boot_logo() {
boot_logo.instantiate();
Error load_err = ImageLoader::load_image(boot_logo_path, boot_logo);
if (load_err) {
ERR_PRINT("Non-existing or invalid boot splash at '" + boot_logo_path + "'. Loading default splash.");
String msg = (boot_logo_path.ends_with(".png") ? "" : "The only supported format is PNG.");
ERR_PRINT("Non-existing or invalid boot splash at '" + boot_logo_path + +"'. " + msg + " Loading default splash.");
}
}
} else {