mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 13:56:24 +02:00
Merge branch 'bart' into marge
This commit is contained in:
commit
c0048afbec
2 changed files with 9 additions and 8 deletions
|
@ -4472,7 +4472,11 @@ void Application::friendsWindowClosed() {
|
|||
}
|
||||
|
||||
void Application::postLambdaEvent(std::function<void()> f) {
|
||||
QCoreApplication::postEvent(this, new LambdaEvent(f));
|
||||
if (this->thread() == QThread::currentThread()) {
|
||||
f();
|
||||
} else {
|
||||
QCoreApplication::postEvent(this, new LambdaEvent(f));
|
||||
}
|
||||
}
|
||||
|
||||
void Application::initPlugins() {
|
||||
|
|
|
@ -85,7 +85,6 @@ TextOverlay::TextOverlay() :
|
|||
_topMargin(DEFAULT_MARGIN),
|
||||
_fontSize(DEFAULT_FONTSIZE)
|
||||
{
|
||||
|
||||
qApp->postLambdaEvent([=] {
|
||||
static std::once_flag once;
|
||||
std::call_once(once, [] {
|
||||
|
@ -117,7 +116,7 @@ TextOverlay::TextOverlay(const TextOverlay* textOverlay) :
|
|||
});
|
||||
});
|
||||
while (!_qmlElement) {
|
||||
QThread::sleep(1);
|
||||
QThread::msleep(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,14 +146,12 @@ xColor TextOverlay::getBackgroundColor() {
|
|||
}
|
||||
|
||||
void TextOverlay::render(RenderArgs* args) {
|
||||
if (!_qmlElement) {
|
||||
return;
|
||||
}
|
||||
if (_visible != _qmlElement->isVisible()) {
|
||||
_qmlElement->setVisible(_visible);
|
||||
}
|
||||
float pulseLevel = updatePulse();
|
||||
static float _oldPulseLevel = 0.0f;
|
||||
if (pulseLevel != _oldPulseLevel) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue