mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 23:31:53 -05:00
Make FileAccess and DirAccess classes reference counted.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
|
||||
#include "thirdparty/tinyexr/tinyexr.h"
|
||||
|
||||
Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {
|
||||
Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, Ref<FileAccess> f, bool p_force_linear, float p_scale) {
|
||||
Vector<uint8_t> src_image;
|
||||
uint64_t src_image_len = f->get_length();
|
||||
ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT);
|
||||
@@ -47,8 +47,6 @@ Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_f
|
||||
|
||||
f->get_buffer(&w[0], src_image_len);
|
||||
|
||||
f->close();
|
||||
|
||||
// Re-implementation of tinyexr's LoadEXRFromMemory using Godot types to store the Image data
|
||||
// and Godot's error codes.
|
||||
// When debugging after updating the thirdparty library, check that we're still in sync with
|
||||
|
||||
Reference in New Issue
Block a user