Browse Source

asmjs: Trying out async.

Branimir Karadžić 10 years ago
parent
commit
f9e63f1d21
1 changed files with 7 additions and 0 deletions
  1. 7 0
      examples/common/entry/entry_asmjs.cpp

+ 7 - 0
examples/common/entry/entry_asmjs.cpp

@@ -9,16 +9,23 @@
 
 
 #include <emscripten.h>
 #include <emscripten.h>
 
 
+extern "C" void entry_emscripten_yield()
+{
+//	emscripten_sleep(0);
+}
+
 namespace entry
 namespace entry
 {
 {
 	const Event* poll()
 	const Event* poll()
 	{
 	{
+		entry_emscripten_yield();
 		return NULL;
 		return NULL;
 	}
 	}
 
 
 	const Event* poll(WindowHandle _handle)
 	const Event* poll(WindowHandle _handle)
 	{
 	{
 		BX_UNUSED(_handle);
 		BX_UNUSED(_handle);
+		entry_emscripten_yield();
 		return NULL;
 		return NULL;
 	}
 	}