瀏覽代碼

Tests shell combine macro settings

Michael Ragazzon 4 年之前
父節點
當前提交
d5dca5486e
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      Tests/Source/Common/TestsShell.cpp

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

@@ -39,12 +39,9 @@
 
 #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
 
-// 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 {
 	const Rml::Vector2i window_size(1500, 800);
@@ -135,15 +132,18 @@ void TestsShell::PresentRenderBuffer()
 
 void TestsShell::RenderLoop()
 {
-#if defined(RMLUI_TESTS_USE_SHELL) && defined(RMLUI_TESTS_ENABLE_RENDER_LOOP)
 	REQUIRE(shell_context);
-	
+
+#if defined(RMLUI_TESTS_USE_SHELL)
 	Shell::EventLoop([]() {
 		shell_context->Update();
 		PrepareRenderBuffer();
 		shell_context->Render();
 		PresentRenderBuffer();
 	});
+#else
+	shell_context->Update();
+	shell_context->Render();
 #endif
 }