From dfae74e169aaef273594e574d38369803480e4ac Mon Sep 17 00:00:00 2001 From: scorpion-26 <58082714+scorpion-26@users.noreply.github.com> Date: Sun, 29 Jan 2023 12:43:05 +0100 Subject: [PATCH] Switch audio loop to late dispatch --- src/AudioFlyin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AudioFlyin.cpp b/src/AudioFlyin.cpp index 5a8c523..8743110 100644 --- a/src/AudioFlyin.cpp +++ b/src/AudioFlyin.cpp @@ -87,6 +87,8 @@ namespace AudioFlyin mainWidget->SetSpacing({8, false}); mainWidget->SetVerticalTransform({16, true, Alignment::Fill}); mainWidget->SetClass("bar"); + // We update the margin in the timer, so we need late dispatch. + mainWidget->AddTimer(DynCtx::Main, 1, TimerDispatchBehaviour::LateDispatch); auto padding = Widget::Create(); padding->SetHorizontalTransform({8, true, Alignment::Fill}); @@ -97,8 +99,6 @@ namespace AudioFlyin padding = Widget::Create(); mainWidget->AddChild(std::move(padding)); - mainWidget->AddTimer(DynCtx::Main, 1); - window = Window(std::move(mainWidget), monitor); window.SetExclusive(false); window.SetAnchor(Anchor::Bottom);