Drawing strategy

Hello. I am making a small space invaders game, and until I make some
graphics, I am just using solid colored blocks. Below I have included my
drawing functions (just a few lines). The problem is that it is very
flickery. I have initialized SDL with the ASYNCBLIT (which enables
vsync???). Anything I’m missing or any help at all.

void Game_Display () {
/* Display the player */
SDL_FillRect (MainSurface, &player.collision, SDL_MapRGB
(MainSurface->format, 100, 0, 0));

    /* Update the screen */
    SDL_UpdateRects (MainSurface, numRects, updateRects);

}

void Game_UnDisplay() {
int i;

    for (i = 0; i < numRects; i++)
            SDL_FillRect (MainSurface, &updateRects[i], SDL_MapRGB 

(MainSurface->format, 0, 0, 0));

    SDL_UpdateRects (MainSurface, numRects, updateRects);

}

Game_UnDisplay is called, then the player moves, then the screen is redrawn.

Hello. I am making a small space invaders game, and until I make some
graphics, I am just using solid colored blocks. Below I have included my
drawing functions (just a few lines). The problem is that it is very
flickery.
I have initialized SDL with the ASYNCBLIT (which enables
vsync???). Anything I’m missing or any help at all.

ASYNCBLIT enables the display system to update the screen in the background
while your game continues doing other things, until you try to lock or
blit to the display surface. Right now only useful in X11 on
machines with more than 1 CPU. It is ignored otherwise.
I’ll clarify the docs on this

[ code fragment ]

You should never call SDL_UpdateRect() or SDL_UpdateRects() more than once
per frame. (The former is just a special case of the latter)