@@ -1542,18 +1542,32 @@ void EditorExportPlatformAndroid::_process_launcher_icons(const String &p_file_n
1542
1542
String EditorExportPlatformAndroid::load_splash_refs (Ref<Image> &splash_image, Ref<Image> &splash_bg_color_image) {
1543
1543
bool scale_splash = GLOBAL_GET (" application/boot_splash/fullsize" );
1544
1544
bool apply_filter = GLOBAL_GET (" application/boot_splash/use_filter" );
1545
+ bool show_splash_image = GLOBAL_GET (" application/boot_splash/show_image" );
1545
1546
String project_splash_path = GLOBAL_GET (" application/boot_splash/image" );
1546
1547
1547
- if (!project_splash_path.is_empty ()) {
1548
- splash_image.instantiate ();
1549
- print_verbose (" Loading splash image: " + project_splash_path);
1550
- const Error err = ImageLoader::load_image (project_splash_path, splash_image);
1551
- if (err) {
1552
- if (OS::get_singleton ()->is_stdout_verbose ()) {
1553
- print_error (" - unable to load splash image from " + project_splash_path + " (" + itos (err) + " )" );
1548
+ // Setup the splash bg color.
1549
+ bool bg_color_valid = false ;
1550
+ Color bg_color = ProjectSettings::get_singleton ()->get (" application/boot_splash/bg_color" , &bg_color_valid);
1551
+ if (!bg_color_valid) {
1552
+ bg_color = boot_splash_bg_color;
1553
+ }
1554
+
1555
+ if (show_splash_image) {
1556
+ if (!project_splash_path.is_empty ()) {
1557
+ splash_image.instantiate ();
1558
+ print_verbose (" Loading splash image: " + project_splash_path);
1559
+ const Error err = ImageLoader::load_image (project_splash_path, splash_image);
1560
+ if (err) {
1561
+ if (OS::get_singleton ()->is_stdout_verbose ()) {
1562
+ print_error (" - unable to load splash image from " + project_splash_path + " (" + itos (err) + " )" );
1563
+ }
1564
+ splash_image.unref ();
1554
1565
}
1555
- splash_image.unref ();
1556
1566
}
1567
+ } else {
1568
+ splash_image.instantiate ();
1569
+ splash_image->initialize_data (1 , 1 , false , Image::FORMAT_RGBA8);
1570
+ splash_image->set_pixel (0 , 0 , bg_color);
1557
1571
}
1558
1572
1559
1573
if (splash_image.is_null ()) {
@@ -1577,13 +1591,6 @@ String EditorExportPlatformAndroid::load_splash_refs(Ref<Image> &splash_image, R
1577
1591
splash_image->resize (width, height);
1578
1592
}
1579
1593
1580
- // Setup the splash bg color
1581
- bool bg_color_valid;
1582
- Color bg_color = ProjectSettings::get_singleton ()->get (" application/boot_splash/bg_color" , &bg_color_valid);
1583
- if (!bg_color_valid) {
1584
- bg_color = boot_splash_bg_color;
1585
- }
1586
-
1587
1594
print_verbose (" Creating splash background color image." );
1588
1595
splash_bg_color_image.instantiate ();
1589
1596
splash_bg_color_image->initialize_data (splash_image->get_width (), splash_image->get_height (), false , splash_image->get_format ());
0 commit comments