SDL_VIDEOEXPOSE event is not happening (Linux, SDL - 1.2.7)

Hi,

I have the following code in my program:

case SDL_VIDEOEXPOSE:{
SDL_BlitSurface(bg, &scr_rect, screen, NULL);
while (sprites[i])
sprites[i++]->display(bg, screen);
SDL_Flip(screen);
} break;

But the code doesn’t seem to get called when the window needs redrawn…

I am handling this with:

switch (event.type)

Am I using the right constant here, or is something else wrong?

Rgds,

Andy

Not that I’ve used this before I looked at the docs and it seems fine.
Perhaps place a breakpoint inside there to see if is reaching inside?

Andy Gow wrote:>Hi,

I have the following code in my program:

case SDL_VIDEOEXPOSE:{
SDL_BlitSurface(bg, &scr_rect, screen, NULL);
while (sprites[i])
sprites[i++]->display(bg, screen);
SDL_Flip(screen);
} break;

But the code doesn’t seem to get called when the window needs redrawn…

I am handling this with:

switch (event.type)

Am I using the right constant here, or is something else wrong?

Rgds,

Andy


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi,

I have the following code in my program:

case SDL_VIDEOEXPOSE:{
SDL_BlitSurface(bg, &scr_rect, screen, NULL);
while (sprites[i])
sprites[i++]->display(bg, screen);
SDL_Flip(screen);
} break;

But the code doesn’t seem to get called when the window needs redrawn…

Can you post a link to a complete example?

Thanks,
-Sam Lantinga, Software Engineer, Blizzard Entertainment