Hi all, I-ve just compiled and installed sdl-1.2.0
on a Debian Linux machine with XFree 4.0.3 using the
3dfx driver (tdfx) DRI.
Now if I try to compile and run a simple SDL program,
the first time the program runs, it works fine.
If i rerun the program again only a blank window is
shown. (and this for all the time i rerun the program
in the same X session )
This dosn’t happen with the SDL test programs.
But for every program I write like this:
note: I skipped all the return tests
everything goes fine with the functions…)
But it works only the first time.
Thanks,
Gabriele
int main ( void )
{
SDL_Surface *screen, image;
SDL_Rect *dest;
SDL_Init(SDL_INIT_VIDEO);
screen = SDL_SetVideoMode(640, 480, 16, SDL_SWSURFACE | SDL_ANYFORMAT );
image = SDL_LoadBMP(“test.bmp”);
dest.x = 0;
dest.y = 0;
dest.w = image->w;
dest.h = image->h;
SDL_BlitSurface(image, NULL, screen, &dest);
SDL_updateRect(screen, 0, 0, 0, 0);
SDL_Delay(3000);
SDL_FreeSurface(image);
SDL_Quit();
return 0;
}