mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-05-10 07:32:08 +02:00
Use image loader directly to avoid "resource as image file" errors.
(cherry picked from commit 908bef8eee145408bbf660e873279a978a0acb74)
This commit is contained in:
parent
c3866cd58a
commit
07109aa595
@ -923,7 +923,7 @@ Error EditorExportPlatformIOS::_export_loading_screen_file(const Ref<EditorExpor
|
|||||||
Ref<Image> image;
|
Ref<Image> image;
|
||||||
String image_path = p_dest_dir.plus_file("splash@2x.png");
|
String image_path = p_dest_dir.plus_file("splash@2x.png");
|
||||||
image.instance();
|
image.instance();
|
||||||
Error err = image->load(custom_launch_image_2x);
|
Error err = ImageLoader::load_image(custom_launch_image_2x, image);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
image.unref();
|
image.unref();
|
||||||
@ -937,7 +937,7 @@ Error EditorExportPlatformIOS::_export_loading_screen_file(const Ref<EditorExpor
|
|||||||
image.unref();
|
image.unref();
|
||||||
image_path = p_dest_dir.plus_file("splash@3x.png");
|
image_path = p_dest_dir.plus_file("splash@3x.png");
|
||||||
image.instance();
|
image.instance();
|
||||||
err = image->load(custom_launch_image_3x);
|
err = ImageLoader::load_image(custom_launch_image_3x, image);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
image.unref();
|
image.unref();
|
||||||
@ -954,7 +954,7 @@ Error EditorExportPlatformIOS::_export_loading_screen_file(const Ref<EditorExpor
|
|||||||
|
|
||||||
if (!splash_path.empty()) {
|
if (!splash_path.empty()) {
|
||||||
splash.instance();
|
splash.instance();
|
||||||
const Error err = splash->load(splash_path);
|
const Error err = ImageLoader::load_image(splash_path, splash);
|
||||||
if (err) {
|
if (err) {
|
||||||
splash.unref();
|
splash.unref();
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
#include "codesign.h"
|
#include "codesign.h"
|
||||||
|
|
||||||
#include "core/config/project_settings.h"
|
#include "core/config/project_settings.h"
|
||||||
|
#include "core/io/image_loader.h"
|
||||||
#include "core/io/marshalls.h"
|
#include "core/io/marshalls.h"
|
||||||
#include "core/io/resource_saver.h"
|
#include "core/io/resource_saver.h"
|
||||||
#include "core/io/zip_io.h"
|
#include "core/io/zip_io.h"
|
||||||
@ -1184,8 +1185,8 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
|||||||
} else {
|
} else {
|
||||||
Ref<Image> icon;
|
Ref<Image> icon;
|
||||||
icon.instance();
|
icon.instance();
|
||||||
icon->load(iconpath);
|
err = ImageLoader::load_image(iconpath, icon);
|
||||||
if (!icon->empty()) {
|
if (err == OK && !icon->empty()) {
|
||||||
_make_icon(p_preset, icon, data);
|
_make_icon(p_preset, icon, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user