Screen doesn't update/flip

HI,

i’m new here, never used a mailinh list before…

well i’ve ported some code form directdraw7 to sdl.

and it’s working fine, but i have a problem: the screen doesn’t update :\

here is my main loop

void
WinApp::MainLoop() {

SDL_Event event;

bool Quit = false;
//bool Active = false;
while(!Quit) {

if(SDL_PollEvent(&event)) {

if ( event.key.keysym.sym == SDLK_ESCAPE ) {

Quit = true;
}

switch(event.type) {

//case SDL_APPACTIVE:
// {
//Active = (event.active.gain == 0) ?false:true;
//break;
//}
case SDL_QUIT:
{
Quit = true;
}
default:break;
}

}else {

//if(Active == true) {
//if(1) {
if(SDL_GetAppState() & SDL_APPACTIVE){
// draw everything
this->draw();

/* …And calculate the fps /
calcFrameRate();
/
now flip the back buffer to the front… */
int er = SDL_Flip(_MainScreen);
}
}
}

}----

// init phase
SDL_Init( SDL_INIT_VIDEO | SDL_INIT_TIMER)==0)

_MainScreen = SDL_SetVideoMode(w,h,bpp,flags);

where flags = SDL_HWSURFACE | SDL_DOUBLEBUF //| SDL_FULLSCREEN
i run windowed mode when i want to debug.

SDL_Flip returns 0 //success
i tried SDL_UpdateRects but it doesn’t solve the problem too
i also tried various flags butt he screen still doesn’t update

i tried to isolate the problem, and i can tell you the the code from
directdraw doesn’t cause the problem since it’s just some maths classes.
any ideas, help ?!

thanx in advance

ps : i use SDL 1.2.7


MSN Search, le moteur de recherche qui pense comme vous !
http://search.msn.fr/