SDL SetVideoMode crash

Hello everybody,

I’m using libSDL with the linux framebuffer and tridentfb driver.
When I’m trying to initialize the video subsystem, SDL changed the video
timings and the kernel crashes.

To avoid this bug (probably in tridentfb), I’d like to tell SDL to use the
current resolution and video timings. How can I use SDL in such manner?

Thanks.
Pascal._________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous !
http://search.msn.fr/

I’m using libSDL with the linux framebuffer and tridentfb driver.
When I’m trying to initialize the video subsystem, SDL changed the video
timings and the kernel crashes.

To avoid this bug (probably in tridentfb), I’d like to tell SDL to use the
current resolution and video timings. How can I use SDL in such manner?

Might be a bug in SDL and not tridentfb, actually: we don’t parse
/etc/fb.modes (there’s a FIXME about this in SDL_fbvideo.c), and then we
count on hardcoded timings generated from a Matrox Millenium card (same
file). You might be able to fix resolution changing by customizing those
hardcoded timings for your hardware.

Alternately, there is a piece of code in SDL_fbvideo.c, around line 746:

if ( (vinfo.xres != width) || (vinfo.yres != height) ||
     (vinfo.bits_per_pixel != bpp) || (flags & SDL_DOUBLEBUF) ) {

Make that:

if (0) {

And maybe you’ll get your requested effect (don’t change resolution at
all, render the smaller surface centered in the current
resolution)…but this is totally untested, and may or may not work.

In the meantime, if someone wants to write that /etc/fb.modes parser,
here’s what the file format looks like:

http://www.8ung.at/spblinux/doc/fb.modes.html

–ryan.

Thanks.

There was a little bug in SDL, I had no /dev/tty0 and that made a kernel
crash.
But now, I made the link to /dev/vc/0 (because I’m using devfs) and all
works fine.>

I’m using libSDL with the linux framebuffer and tridentfb driver.
When I’m trying to initialize the video subsystem, SDL changed the video
timings and the kernel crashes.

To avoid this bug (probably in tridentfb), I’d like to tell SDL to use
the
current resolution and video timings. How can I use SDL in such manner?

Might be a bug in SDL and not tridentfb, actually: we don’t parse
/etc/fb.modes (there’s a FIXME about this in SDL_fbvideo.c), and then we
count on hardcoded timings generated from a Matrox Millenium card (same
file). You might be able to fix resolution changing by customizing those
hardcoded timings for your hardware.

Alternately, there is a piece of code in SDL_fbvideo.c, around line 746:

if ( (vinfo.xres != width) || (vinfo.yres != height) ||
(vinfo.bits_per_pixel != bpp) || (flags & SDL_DOUBLEBUF) ) {

Make that:

if (0) {

And maybe you’ll get your requested effect (don’t change resolution at
all, render the smaller surface centered in the current
resolution)…but this is totally untested, and may or may not work.

In the meantime, if someone wants to write that /etc/fb.modes parser,
here’s what the file format looks like:

http://www.8ung.at/spblinux/doc/fb.modes.html

–ryan.


MSN Messenger http://g.msn.fr/FR1001/866 : dialoguez en son et en images
avec vos amis