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
This commit is contained in:
skidau 2015-04-28 10:23:54 +00:00
parent 8068cdd431
commit 6f85e29631
1 changed files with 14 additions and 1 deletions

View File

@ -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();