[SDL] SDL fullscreen problem

Alberto Luaces aluaces at udc.es
Tue Sep 4 08:36:34 PDT 2007


El Martes 04 Septiembre 2007 17:27, escribió:
> 于 Tue, 4 Sep 2007 16:40:39 +0200
>
> Alberto Luaces <aluaces at udc.es> 写道:
> > El Martes 04 Septiembre 2007 16:01, cocobear escribió:
> > > I should use #include "SDL/SDL.h",because if I use "SDL.h",the GCC
> > > could't find SDL.h
> > > My SDL.h is in /usr/include/SDL/SDL.h
> >
> > No, you should use "SDL.h" only, because "sdl-config --cflags" gives
> >
> > -I/usr/include/SDL
> >
> > so GCC can find the header. You should then compile so:
> >
> > gcc myfile.c `sdl-config --cflags` -c
> > _______________________________________________
>
> I find the problem!
> When I try this code on my classmate's computer ,and there's no
> problem,his OS also Fedora 7.
>
> When I change video mode to 1024x768,it works. 1024x768 is my
> resolution of X.
>
> Is it bug of SDL or problem of my Video Card.

I am wonder why SDL_SetVideoMode did not return NULL if the video mode you 
were trying to set was not valid.

Try this:

- On the console, type

ulimit -c unlimited

so when your program crashes we can get an stack trace.

- Run your program from the console you typed that last command.
- After the crash, check for a file named 'core'.
- Run the debugger:

gdb your_program core

the debugger stops the program at the point it crashed. Type:

bt

the content of the stack will be printed. Please send us that list.


More information about the SDL mailing list