瀏覽代碼

clear OsEventBuffer at the end of frame()

mikymod 12 年之前
父節點
當前提交
ae28e93aa2
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      engine/Device.cpp

+ 7 - 1
engine/Device.cpp

@@ -54,6 +54,7 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include "Bundle.h"
 #include "Bundle.h"
 #include "TempAllocator.h"
 #include "TempAllocator.h"
 #include "ResourcePackage.h"
 #include "ResourcePackage.h"
+#include "OsEventBuffer.h"
 
 
 #if defined(LINUX) || defined(WINDOWS)
 #if defined(LINUX) || defined(WINDOWS)
 	#include "BundleCompiler.h"
 	#include "BundleCompiler.h"
@@ -172,7 +173,10 @@ bool Device::init(int argc, char** argv)
 	#endif
 	#endif
 
 
 	g_main_thread.start();
 	g_main_thread.start();
-	// g_main_thread.join();
+
+	#ifndef ANDROID
+	g_main_thread.join();
+	#endif
 
 
 	return true;
 	return true;
 }
 }
@@ -524,6 +528,8 @@ void Device::frame()
 	}
 	}
 
 
 	m_frame_count++;
 	m_frame_count++;
+
+	os_event_buffer()->clear();
 }
 }
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------