SDL-1.2.0 Very Strange behavi

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;
}

This is probably /not/ the problem in your code… because I doubt you would be
able to compile it with this mistake… but just in case, I’ll point out the
obvious:

This should be SDL_UpdateRect(…)On Fri, 11 May 2001, you wrote:

SDL_updateRect(screen, 0, 0, 0, 0);


Sam “Criswell” Hart <@Sam_Hart> AIM, Yahoo!:
Homepage: < http://www.geekcomix.com/snh/ >
PGP Info: < http://www.geekcomix.com/snh/contact/ >
Advogato: < http://advogato.org/person/criswell/ >

SDL_updateRect(screen, 0, 0, 0, 0);

This is probably /not/ the problem in your code… because I doubt you
would be
able to compile it with this mistake… but just in case, I’ll point out
the
obvious:

This should be SDL_UpdateRect(…)

Yes it was a typo in the e-mail message…

I think It’s an X bug or something anyway.
It has never happened to me before.
(I use SDL since 1.0.1)

We’ll see.

Thanks,
G.GabrieleOn Fri, 11 May 2001 18:58:04 Samuel Hart wrote:

On Fri, 11 May 2001, you wrote: