Browse Source

Tests shell combine macro settings

Michael Ragazzon 4 years ago
parent
commit
d5dca5486e
1 changed files with 6 additions and 6 deletions
  1. 6 6
      Tests/Source/Common/TestsShell.cpp

+ 6 - 6
Tests/Source/Common/TestsShell.cpp

@@ -39,12 +39,9 @@
 
 
 #include <doctest.h>
 #include <doctest.h>
 
 
-// Uncomment the following to render to the shell window instead of the dummy renderer.
+// Uncomment the following to render to the shell window instead of the dummy renderer. Useful for viewing the result while building RML.
 //#define RMLUI_TESTS_USE_SHELL
 //#define RMLUI_TESTS_USE_SHELL
 
 
-// Uncomment the following line to enable rendering the context in a loop. Requires the shell backend. Useful for viewing the result while building RML.
-//#define RMLUI_TESTS_ENABLE_RENDER_LOOP
-
 
 
 namespace {
 namespace {
 	const Rml::Vector2i window_size(1500, 800);
 	const Rml::Vector2i window_size(1500, 800);
@@ -135,15 +132,18 @@ void TestsShell::PresentRenderBuffer()
 
 
 void TestsShell::RenderLoop()
 void TestsShell::RenderLoop()
 {
 {
-#if defined(RMLUI_TESTS_USE_SHELL) && defined(RMLUI_TESTS_ENABLE_RENDER_LOOP)
 	REQUIRE(shell_context);
 	REQUIRE(shell_context);
-	
+
+#if defined(RMLUI_TESTS_USE_SHELL)
 	Shell::EventLoop([]() {
 	Shell::EventLoop([]() {
 		shell_context->Update();
 		shell_context->Update();
 		PrepareRenderBuffer();
 		PrepareRenderBuffer();
 		shell_context->Render();
 		shell_context->Render();
 		PresentRenderBuffer();
 		PresentRenderBuffer();
 	});
 	});
+#else
+	shell_context->Update();
+	shell_context->Render();
 #endif
 #endif
 }
 }