Skip to content

Commit

Permalink
In demo sample, fix form submit animation not playing smoothly on pow…
Browse files Browse the repository at this point in the history
…er saving mode
  • Loading branch information
mikke89 committed Dec 25, 2023
1 parent 90d2ef2 commit 3176c85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Samples/basic/demo/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ class DemoWindow : public Rml::EventListener {
if (auto el_output = document->GetElementById("form_output"))
el_output->SetInnerRML(submit_message);
}

document->GetContext()->RequestNextUpdate(.0);
}
}

Expand Down Expand Up @@ -465,9 +467,9 @@ int main(int /*argc*/, char** /*argv*/)
bool running = true;
while (running)
{
running = Backend::ProcessEvents(context, &Shell::ProcessKeyDownShortcuts, true);

demo_window->Update();

running = Backend::ProcessEvents(context, &Shell::ProcessKeyDownShortcuts, true);
context->Update();

Backend::BeginFrame();
Expand Down

0 comments on commit 3176c85

Please sign in to comment.