mikymod пре 12 година
родитељ
комит
6a50cfd29a
2 измењених фајлова са 17 додато и 18 уклоњено
  1. 16 16
      engine/lua/LuaEnvironment.cpp
  2. 1 2
      engine/lua/LuaEnvironment.h

+ 16 - 16
engine/lua/LuaEnvironment.cpp

@@ -150,22 +150,22 @@ void LuaEnvironment::execute(int32_t args, int32_t results)
 	}
 }
 
-//-----------------------------------------------------------------------------
-void LuaEnvironment::collect_garbage()
-{
-	uint64_t start = os::milliseconds();
-
-	while ((os::milliseconds() - start) < device()->last_delta_time() && !m_is_used)
-	{
-		lua_gc(m_state, LUA_GCSTEP, 0);
-	}
-}
-
-//-----------------------------------------------------------------------------
-void* LuaEnvironment::background_thread(void* thiz)
-{
-	((LuaEnvironment*)thiz)->collect_garbage();	
-}
+// //-----------------------------------------------------------------------------
+// void LuaEnvironment::collect_garbage()
+// {
+// 	uint64_t start = os::milliseconds();
+
+// 	while ((os::milliseconds() - start) < device()->last_delta_time() && !m_is_used)
+// 	{
+// 		lua_gc(m_state, LUA_GCSTEP, 0);
+// 	}
+// }
+
+// //-----------------------------------------------------------------------------
+// void* LuaEnvironment::background_thread(void* thiz)
+// {
+// 	((LuaEnvironment*)thiz)->collect_garbage();	
+// }
 
 //-----------------------------------------------------------------------------
 void LuaEnvironment::game_init()

+ 1 - 2
engine/lua/LuaEnvironment.h

@@ -71,7 +71,6 @@ public:
 	void					game_shutdown();
 	/// Call frame function in the Lua game file
 	void					game_frame(float dt);
-
 	/// Load a function which will be used in Lua. @a module is the name of table contenitor,
 	/// @a name is the name of function in module and @func is the pointer to the function.
 	/// _func_ must be a C/lua function (__int32_t function_name(lua_State* L)__)
@@ -96,7 +95,7 @@ private:
 	/// LuaEnvironment is used right now?
 	bool					m_is_used;
 	/// Thread used for garbage collection
-	os::Thread 				m_thread;
+	// os::Thread 				m_thread;
 
 	char					m_error_buffer[1024];