소스 검색

Better emscripten error handling - mainloop stops when debugger triggered.

Mark Sibly 7 년 전
부모
커밋
45d46485fa
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      modules/monkey/native/bbdebug.cpp

+ 8 - 0
modules/monkey/native/bbdebug.cpp

@@ -10,6 +10,10 @@
 
 #include <signal.h>
 
+#ifdef __EMSCRIPTEN__
+#include <emscripten.h>
+#endif
+
 typedef void(*dbEmit_t)(void*);
 
 namespace bbDB{
@@ -130,6 +134,10 @@ namespace bbDB{
 		bb_printf( "\n" );
 		fflush( stdout );
 		
+#ifdef __EMSCRIPTEN__
+		emscripten_pause_main_loop();
+#endif
+		
 		for(;;){
 		
 			char buf[256];