only SDL_Flip is critical, not the check

This commit is contained in:
neingeist 2014-05-11 11:44:47 +02:00
parent 3771b2578e
commit bbae44fec7

View file

@ -53,9 +53,9 @@ void drawmandelbrot(SDL_Surface * surface) {
pixels[i] = color;
/* Update the screen every 10 lines. */
if (y % 10 == 0 && x == 0) {
#pragma omp critical
{
if (y % 10 == 0 && x == 0) {
SDL_Flip(surface);
}
}