diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-31 23:55:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-31 23:55:55 +0200 |
commit | 787bb0f26933effa2199a0608f6e0055e10997b2 (patch) | |
tree | 9658c3b9b16f45b4332878e48e66c23f4d8e38f0 /core/core_bind.cpp | |
parent | 790b63b27cb0a792f99f9da481b292d5f01cda4a (diff) | |
parent | 1cfe3c3f8bd5c600e19926427c4b9c1426475edb (diff) |
Merge pull request #54732 from zedutch/fix-threaded-load-request-cachemode
Diffstat (limited to 'core/core_bind.cpp')
-rw-r--r-- | core/core_bind.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/core_bind.cpp b/core/core_bind.cpp index 3852f77bfc..3f94ff8329 100644 --- a/core/core_bind.cpp +++ b/core/core_bind.cpp @@ -46,8 +46,8 @@ namespace core_bind { ResourceLoader *ResourceLoader::singleton = nullptr; -Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads) { - return ::ResourceLoader::load_threaded_request(p_path, p_type_hint, p_use_sub_threads); +Error ResourceLoader::load_threaded_request(const String &p_path, const String &p_type_hint, bool p_use_sub_threads, CacheMode p_cache_mode) { + return ::ResourceLoader::load_threaded_request(p_path, p_type_hint, p_use_sub_threads, ResourceFormatLoader::CacheMode(p_cache_mode)); } ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const String &p_path, Array r_progress) { @@ -121,7 +121,7 @@ ResourceUID::ID ResourceLoader::get_resource_uid(const String &p_path) { } void ResourceLoader::_bind_methods() { - ClassDB::bind_method(D_METHOD("load_threaded_request", "path", "type_hint", "use_sub_threads"), &ResourceLoader::load_threaded_request, DEFVAL(""), DEFVAL(false)); + ClassDB::bind_method(D_METHOD("load_threaded_request", "path", "type_hint", "use_sub_threads", "cache_mode"), &ResourceLoader::load_threaded_request, DEFVAL(""), DEFVAL(false), DEFVAL(CACHE_MODE_REUSE)); ClassDB::bind_method(D_METHOD("load_threaded_get_status", "path", "progress"), &ResourceLoader::load_threaded_get_status, DEFVAL(Array())); ClassDB::bind_method(D_METHOD("load_threaded_get", "path"), &ResourceLoader::load_threaded_get); |