mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Make FileAccess and DirAccess classes reference counted.
This commit is contained in:
parent
ca9372622f
commit
9381acb6a4
193 changed files with 1122 additions and 1776 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue