summaryrefslogtreecommitdiff
path: root/editor/editor_resource_preview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_resource_preview.cpp')
-rw-r--r--editor/editor_resource_preview.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 40482dc367..3c401a6fc7 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -217,7 +217,7 @@ void EditorResourcePreview::_thread() {
exited = false;
while (!exit) {
- preview_sem->wait();
+ preview_sem.wait();
preview_mutex.lock();
if (queue.size()) {
@@ -379,7 +379,7 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource> &p
queue.push_back(item);
}
- preview_sem->post();
+ preview_sem.post();
}
void EditorResourcePreview::queue_resource_preview(const String &p_path, Object *p_receiver, const StringName &p_receiver_func, const Variant &p_userdata) {
@@ -403,7 +403,7 @@ void EditorResourcePreview::queue_resource_preview(const String &p_path, Object
queue.push_back(item);
}
- preview_sem->post();
+ preview_sem.post();
}
void EditorResourcePreview::add_preview_generator(const Ref<EditorResourcePreviewGenerator> &p_generator) {
@@ -462,7 +462,7 @@ void EditorResourcePreview::start() {
void EditorResourcePreview::stop() {
if (thread) {
exit = true;
- preview_sem->post();
+ preview_sem.post();
while (!exited) {
OS::get_singleton()->delay_usec(10000);
VisualServer::get_singleton()->sync(); //sync pending stuff, as thread may be blocked on visual server
@@ -476,7 +476,6 @@ void EditorResourcePreview::stop() {
EditorResourcePreview::EditorResourcePreview() {
thread = NULL;
singleton = this;
- preview_sem = SemaphoreOld::create();
order = 0;
exit = false;
exited = false;
@@ -485,5 +484,4 @@ EditorResourcePreview::EditorResourcePreview() {
EditorResourcePreview::~EditorResourcePreview() {
stop();
- memdelete(preview_sem);
}