Hi,
Ya, this works for me too. But try adding SDL_DOUBLEBUF | SDL_HWSURFACE
to
your videoflags when you create the screen. That’s when it crashes on me.
yep, I get that too (win9x as well), will look into it,
cheers,
John.> ----- Original Message -----
From: jason@hoffoss.com (Jason Hoffoss)
To:
Sent: Tuesday, March 19, 2002 6:08 PM
Subject: Re: [SDL] Crashing problem - works OK here----- Original Message -----
From: “John Popplewell” <@John_Popplewell>
To:
Sent: Tuesday, March 19, 2002 12:10 PM
Subject: Re: [SDL] Crashing problem - works OK hereHi,
just put together a complete minimal-ish example :
–8<-------------------------------------------------
#include “sdl.h”
#include “sdl_image.h”
#include “assert.h”
#include “stdlib.h”void test( SDL_Surface *screen )
{
SDL_Surface *intro, *temp;temp = IMG_Load(“images/pngbar.png”);
assert(temp);
intro = SDL_DisplayFormat(temp);
assert(intro);
SDL_FreeSurface(temp);SDL_SetAlpha(intro, SDL_SRCALPHA, 128);
SDL_BlitSurface(intro, NULL, screen, NULL);SDL_FreeSurface(intro);
}int main( int argc, char *argv[] )
{
SDL_Surface *screen;
int width, height, bpp;
Uint32 videoflags;
SDL_Event event;
int done;width = 640; height = 480; bpp = 16;
videoflags = SDL_SWSURFACE;
//videoflags |= SDL_FULLSCREEN;if ( SDL_Init(SDL_INIT_VIDEO) < 0 )
{
fprintf(stderr, “Couldn’t initialize SDL: %s\n”,SDL_GetError());
exit(1);
}screen = SDL_SetVideoMode( width, height, bpp, videoflags );
if ( screen == NULL )
{
fprintf( stderr, “Couldn’t set display mode: %s\n”, SDL_GetError() );
SDL_Quit();
exit(2);
}test( screen );
done = 0;
while ( !done && SDL_WaitEvent( &event ) )
{
switch( event.type )
{
case SDL_KEYDOWN:
if ( event.key.keysym.sym == SDLK_ESCAPE )
done = 1;
break;
case SDL_QUIT:
done = 1;
break;
default:
break;
}
}
SDL_Quit();
return 0;
}
---------------------------------------------->8-----this works fine on my Win2K box in windowed or fullscreen.
The PNG image is an example file supplied with libpng-1.0
Compiled with VC6.0-SP4 using recent SDL CVS (~28-Feb-2002)Ya, this works for me too. But try adding SDL_DOUBLEBUF | SDL_HWSURFACE
to
your videoflags when you create the screen. That’s when it crashes on me.I recently had a “problem” with the latest official nVidia drivers
(admittedly for 9x/ME): worked fine in a window but everything
crashed like a bastard in fullscreen mode - switched back to
12.41 and all OK again,Well, I’ve got a Voodoo 3 still, so this shouldn’t be an issue for me.
-Jason
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl