diff OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp @ 1565:b8b4cb58a874

removed unnecessary include
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 17 Sep 2020 15:19:48 +0200
parents 314b6dc507d9
children a80363b15235
line wrap: on
line diff
--- a/OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp	Thu Sep 17 15:18:21 2020 +0200
+++ b/OrthancStone/Sources/Viewport/WebAssemblyViewport.cpp	Thu Sep 17 15:19:48 2020 +0200
@@ -207,7 +207,15 @@
 
   void WebAssemblyViewport::Invalidate()
   {
-    emscripten_request_animation_frame(OnRequestAnimationFrame, reinterpret_cast<void*>(this));
+    if (compositor_.get() != NULL &&
+        controller_ /* should always be true */)
+    {
+      printf("TOTO3\n");
+      UpdateSize(*compositor_);
+      OnRequestAnimationFrame(0, reinterpret_cast<void*>(this));
+    }
+    
+    //emscripten_request_animation_frame(OnRequestAnimationFrame, reinterpret_cast<void*>(this));
   }
 
   void WebAssemblyViewport::AcquireCompositor(ICompositor* compositor /* takes ownership */)