Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when loading non-PNG splash image #96197

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

jsjtxietian
Copy link
Contributor

Fixes #96177

Are there any other places that needs check?

@jsjtxietian jsjtxietian requested a review from a team as a code owner August 28, 2024 03:01
@akien-mga akien-mga changed the title Add is png check and better err msg when loading and exporting splash imgae Improve error message when loading non-PNG splash image Aug 29, 2024
@akien-mga akien-mga merged commit 8186fab into godotengine:master Aug 29, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks!

@@ -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.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a potential double space here. 🙃 One of the spaces should be a part of msg.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I noticed the double + too, lol

@jsjtxietian jsjtxietian deleted the splash-msg branch August 30, 2024 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setup_boot_logo: Non-existing or invalid boot splash at 'res://icon.svg'. Loading default splash.
4 participants