From 04ad0505c717ee22d421aa0a3f342a222aaee708 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Fri, 24 Jul 2020 19:25:12 +0300 Subject: [PATCH] Fix font shadow problem --- applications/gui2/src/views/statistics.cpp | 1 + components/streams/src/builder.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/applications/gui2/src/views/statistics.cpp b/applications/gui2/src/views/statistics.cpp index c27a24344..e72bc160a 100644 --- a/applications/gui2/src/views/statistics.cpp +++ b/applications/gui2/src/views/statistics.cpp @@ -84,6 +84,7 @@ void StatisticsWidget::draw(NVGcontext *ctx) { else nvgFontFace(ctx, "sans-bold"); nvgFillColor(ctx, nanogui::Color(8, 8, 8, 255)); // shadow tw = nvgTextBounds(ctx, pos[0] + width(), rowh, msg.c_str(), nullptr, nullptr); + nvgText(ctx, pos[0] + width(), rowh, msg.c_str(), nullptr); nvgFillColor(ctx, colour); nvgText(ctx, pos[0] + width() - 1, rowh - 1, msg.c_str(), nullptr); tw += 10; diff --git a/components/streams/src/builder.cpp b/components/streams/src/builder.cpp index 1eae72dcb..f4fc8b6a4 100644 --- a/components/streams/src/builder.cpp +++ b/components/streams/src/builder.cpp @@ -316,11 +316,13 @@ void ForeignBuilder::_schedule() { jobs_++; ftl::pool.push([this,fs](int) { - // Calling onFrameset but without all frames so mark as partial - if (static_cast<size_t>(fs->count) < fs->frames.size()) fs->set(ftl::data::FSFlag::PARTIAL); - fs->store(); + if (!fs->isComplete()) { + fs->set(ftl::data::FSFlag::PARTIAL); + fs->frames[0].message(ftl::data::Message::Warning_INCOMPLETE_FRAME, "Frameset not complete"); + } + //UNIQUE_LOCK(fs->mutex(), lk2); try { @@ -373,7 +375,7 @@ std::shared_ptr<ftl::data::FrameSet> ForeignBuilder::_getFrameset() { while (N-- > 0 && i != framesets_.end()) ++i; // Otherwise skip to first fully completed frame } else { - while (i != framesets_.end() && static_cast<size_t>((*i)->count) < (*i)->frames.size()) ++i; + while (i != framesets_.end() && !(*i)->isComplete()) ++i; } if (i != framesets_.end()) { -- GitLab