diff Applications/Platforms/WebAssembly/WebAssemblyViewport.h @ 1618:9a52bac0c2a7

Added code to clear pending calls to RequestAnimationFrame
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 02 Nov 2020 17:54:18 +0100
parents 5887a4f8594b
children 575f512cdf48
line wrap: on
line diff
--- a/Applications/Platforms/WebAssembly/WebAssemblyViewport.h	Fri Oct 30 17:43:29 2020 +0100
+++ b/Applications/Platforms/WebAssembly/WebAssemblyViewport.h	Mon Nov 02 17:54:18 2020 +0100
@@ -41,6 +41,7 @@
 
 #include <memory>
 #include <string>
+#include <vector>
 #include <boost/enable_shared_from_this.hpp>
 
 namespace OrthancStone
@@ -60,6 +61,7 @@
     bool                                  enableEmscriptenMouseEvents_;
     unsigned int                          canvasWidth_;
     unsigned int                          canvasHeight_;
+    std::vector<long>                     animationFrameCallbackIds_;
 
     static EM_BOOL OnRequestAnimationFrame(double time, void *userData);