SDL_SetVideoMode() crash on Radeon

Hi,

I’m writing a program that uses SDL 1.2.6 (precompiled DLL) + OpenGL
under Windows 98. On my previous S3 ProSavage 4, it worked fine, but
I’ve just installed a Radeon 9200 SE 128MB and now SDL_SetVideoMode()
crashes (parachute thingy).

Here’s the code I’m using:

SDL_Surface *screen = NULL;
const SDL_VideoInfo *info = NULL;
int bpp;

if( SDL_InitSubSystem( SDL_INIT_VIDEO ) < 0 ) {
printf( “Error initializing video: %s\n”, SDL_GetError() );
return FALSE;
}

info = SDL_GetVideoInfo();
if( !info ) {
printf( “Video query failed: %s\n”, SDL_GetError() );
Display_Exit();
return FALSE;
}

bpp = info->vfmt->BitsPerPixel;

SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 8 );
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );

SDL_Surface *surf = IMG_Load( “perle_1a.png” );
if( surf ) {
SDL_WM_SetIcon( surf, NULL );
SDL_FreeSurface( surf );
}

screen = SDL_SetVideoMode( g_Width, g_Height, bpp, SDL_OPENGL );

g_Width is 640 and g_Height is 480. The bpp returned by GetVideoInfo is
32, but I’ve tried 24 and 0 and it still crashes.

Am I doing anything wrong ? Any clue about what could be done to avoid
the crash ?–
Incoming HTML mails are automatically deleted.

“When a monster is shot, I want some blood particles to fly around. Does
anybody have an idea, how and in which direction the particles should
fly?”

off at free.fr.ARGL.invalid wrote:

SDL_Surface *surf = IMG_Load( “perle_1a.png” );
if( surf ) {
SDL_WM_SetIcon( surf, NULL );
SDL_FreeSurface( surf );
}
screen = SDL_SetVideoMode( g_Width, g_Height, bpp, SDL_OPENGL );
Am I doing anything wrong ? Any clue about what could be done to avoid
the crash ?

I’ve not time to look at the SDL sources but I seem to remember you can
change the mouse pointer only if you have a valid video surface, try to
swap the SDL_SetVideoMode and the pointer initialization stuff.

Bye,
Gabry

'lo Gabriele,On 12/02/2004, Gabriele Greco, you wrote:

SDL_WM_SetIcon( surf, NULL );

I’ve not time to look at the SDL sources but I seem to remember you
can change the mouse pointer only if you have a valid video surface,
try to swap the SDL_SetVideoMode and the pointer initialization stuff.

I’m not setting the mouse pointer gfx, but the icon that appears in the
window frame. It has to be set before the window is opened, I think.

I tried changing the GL attributes and bpp but nothing worked,
SDL_SetVideoMode() still crashes. I’ll try with the latest Radeon 9200
SE drivers but I’d really like to make it work with the driver supplied
with the card… (Quake3 is working with them, after all, so it
should be possible!).

Thanks

Please remove “.ARGL.invalid” from my email when replying.
Incoming HTML mails are automatically deleted.

FYI:

I’m writing a program that uses SDL 1.2.6 (precompiled DLL) + OpenGL
under Windows 98. On my previous S3 ProSavage 4, it worked fine, but
I’ve just installed a Radeon 9200 SE 128MB and now SDL_SetVideoMode()
crashes (parachute thingy).

I wish I could have solved this so that my program worked with the
drivers supplied with the card, but I finally installed the latest
drivers from ATI’s site and the crash has gone. Good news anyway :-).–
Please remove “.ARGL.invalid” from my email when replying.
Incoming HTML mails are automatically deleted.