aboutsummaryrefslogtreecommitdiff
path: root/editor/plugins/asset_library_editor_plugin.cpp
diff options
context:
space:
mode:
authorFabio Alessandrelli2018-02-28 15:08:17 +0100
committerHein-Pieter van Braam2018-03-28 21:03:56 +0200
commit89bff17cd2e5c199198adfaa09cf6bf08336c67c (patch)
tree4b82b5624e3620a5bbeb082b67df05fe0eacfd1e /editor/plugins/asset_library_editor_plugin.cpp
parent3e1716b2c39854b442d8419a1998ede40a0070f6 (diff)
downloadgodot-89bff17cd2e5c199198adfaa09cf6bf08336c67c.tar.gz
godot-89bff17cd2e5c199198adfaa09cf6bf08336c67c.tar.zst
godot-89bff17cd2e5c199198adfaa09cf6bf08336c67c.zip
More threading in AssetLib
AssetLib now uses thread as requested to download previews and items (cherry picked from commit 3a25415a1c2928e22b4eb9da782237ed73fb79c8)
Diffstat (limited to '')
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 76254187a..704b0512f 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -514,6 +514,7 @@ EditorAssetLibraryItemDownload::EditorAssetLibraryItemDownload() {
download = memnew(HTTPRequest);
add_child(download);
download->connect("request_completed", this, "_http_download_completed");
+ download->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
download_error = memnew(AcceptDialog);
add_child(download_error);
@@ -832,6 +833,7 @@ void EditorAssetLibrary::_request_image(ObjectID p_for, String p_image_url, Imag
iq.image_index = p_image_index;
iq.image_type = p_type;
iq.request = memnew(HTTPRequest);
+ iq.request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
iq.target = p_for;
iq.queue_id = ++last_queue_id;