From b524b40fdc5325c840192ce92dbed8108ccef2d9 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 6 Jun 2015 22:06:58 -0300 Subject: -fixed many memory initialization issues -fixed deadlock on previews thread -fixed compilation errors on unix --- servers/visual/visual_server_wrap_mt.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'servers/visual/visual_server_wrap_mt.cpp') diff --git a/servers/visual/visual_server_wrap_mt.cpp b/servers/visual/visual_server_wrap_mt.cpp index 44a41a93d..19dff3d36 100644 --- a/servers/visual/visual_server_wrap_mt.cpp +++ b/servers/visual/visual_server_wrap_mt.cpp @@ -96,16 +96,19 @@ void VisualServerWrapMT::thread_loop() { /* EVENT QUEUING */ -void VisualServerWrapMT::flush() { +void VisualServerWrapMT::sync() { if (create_thread) { + /* TODO: sync with the thread */ + + /* ERR_FAIL_COND(!draw_mutex); draw_mutex->lock(); draw_pending++; //cambiar por un saferefcount draw_mutex->unlock(); - - command_queue.push( this, &VisualServerWrapMT::thread_flush); + */ + //command_queue.push( this, &VisualServerWrapMT::thread_flush); } else { command_queue.flush_all(); //flush all pending from other threads @@ -118,15 +121,16 @@ void VisualServerWrapMT::draw() { if (create_thread) { + /* TODO: Make it draw ERR_FAIL_COND(!draw_mutex); draw_mutex->lock(); draw_pending++; //cambiar por un saferefcount draw_mutex->unlock(); command_queue.push( this, &VisualServerWrapMT::thread_draw); + */ } else { - command_queue.flush_all(); //flush all pending from other threads visual_server->draw(); } } -- cgit v1.2.3-70-g09d2