Browse Source

In demo sample, fix form submit animation not playing smoothly on power saving mode

Michael Ragazzon 2 years ago
parent
commit
3176c85846
1 changed files with 4 additions and 2 deletions
  1. 4 2
      Samples/basic/demo/src/main.cpp

+ 4 - 2
Samples/basic/demo/src/main.cpp

@@ -166,6 +166,8 @@ public:
 				if (auto el_output = document->GetElementById("form_output"))
 				if (auto el_output = document->GetElementById("form_output"))
 					el_output->SetInnerRML(submit_message);
 					el_output->SetInnerRML(submit_message);
 			}
 			}
+
+			document->GetContext()->RequestNextUpdate(.0);
 		}
 		}
 	}
 	}
 
 
@@ -465,9 +467,9 @@ int main(int /*argc*/, char** /*argv*/)
 	bool running = true;
 	bool running = true;
 	while (running)
 	while (running)
 	{
 	{
-		running = Backend::ProcessEvents(context, &Shell::ProcessKeyDownShortcuts, true);
-
 		demo_window->Update();
 		demo_window->Update();
+
+		running = Backend::ProcessEvents(context, &Shell::ProcessKeyDownShortcuts, true);
 		context->Update();
 		context->Update();
 
 
 		Backend::BeginFrame();
 		Backend::BeginFrame();