From c7a0e39af1a1080c461994ecc1ef4620a56e2b14 Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Thu, 29 Aug 2024 10:49:04 +0800 Subject: [PATCH] Add is png check and better err msg when loading splash imgae --- main/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/main.cpp b/main/main.cpp index af8f1c692a8..06edeae3c5c 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -3307,7 +3307,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 {