From 6f85e2963109407c61b7a017fbf36750e4fc854a Mon Sep 17 00:00:00 2001 From: skidau Date: Tue, 28 Apr 2015 10:23:54 +0000 Subject: [PATCH] Fixed some of the filters in the wx build. Disabled multi-threaded filtering. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1368 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/wx/panel.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index 59c663b4..545aa2c0 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -1307,6 +1307,9 @@ void DrawingPanel::DrawArea(u8 **data) } else todraw = pixbuf2; + // FIXME: filters race condition? + gopts.max_threads = 1; + // First, apply filters, if applicable, in parallel, if enabled if(gopts.filter != FF_NONE || gopts.ifb != FF_NONE /* FIXME: && (gopts.ifb != FF_MOTION_BLUR || !renderer_can_motion_blur) */ ) { @@ -1353,8 +1356,18 @@ void DrawingPanel::DrawArea(u8 **data) threads[i].Run(); } } - } else if(nthreads == 1) + } else if(nthreads == 1) { + threads[0].threadno = 0; + threads[0].nthreads = 1; + threads[0].width = width; + threads[0].height = height; + threads[0].scale = scale; + threads[0].src = *data; + threads[0].dst = todraw; + threads[0].delta = delta; + threads[0].rpi = rpi; threads[0].Entry(); + } else { for(int i = 0; i < nthreads; i++) { threads[i].lock.Lock();