mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 02:56:31 +02:00
Only refresh engine settings on own thread
This commit is contained in:
parent
29f9d15af0
commit
e4af8d89f1
1 changed files with 8 additions and 3 deletions
|
@ -9,8 +9,7 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include "Task.h"
|
||||
|
||||
#include <QtCore/QThread>
|
||||
#include <qscriptengine.h> // QObject
|
||||
|
||||
#include "Context.h"
|
||||
|
@ -18,9 +17,15 @@
|
|||
#include "gpu/Batch.h"
|
||||
#include <PerfStat.h>
|
||||
|
||||
#include "Task.h"
|
||||
|
||||
using namespace render;
|
||||
|
||||
void TaskConfig::refresh() {
|
||||
// FIXME: Only configure when on own thread (see RecordingInterface for example)
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMetaObject::invokeMethod(this, "refresh", Qt::BlockingQueuedConnection);
|
||||
return;
|
||||
}
|
||||
|
||||
_task->configure(*this);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue