SDL force full screen in X

Dear all,

I have my KDE installed and run several SDL programs on it. I have used VESA (791, 1024x768 at 64l) specified in lilo.conf. My display card is nVidia Geforce 2MX. In X environment, even the surface is init as 800x600 or 1024x768 or whatever without SDL_FULLSCREEN flag, it gives me “Full screen mode” surrounded by black strip. After several testing, I realise the resolution of the screen is that I specify in lilo but not the resolution in X.

How can I make it to window mode? I have tried SDL_WM_ToggleFullScreen(), unset the flag. But none help.
Please advise.

Many thanks,
Ed

Sounds like you have an SDL lib without X support, or maybe that it
can’t find or access X for some reason.

Some distros configure X to refuse connections from local root.

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Tuesday 12 April 2005 13.05, edison wrote:

Dear all,

I have my KDE installed and run several SDL programs on it. I have
used VESA (791, 1024x768 at 64l) specified in lilo.conf. My display
card is nVidia Geforce 2MX. In X environment, even the surface is
init as 800x600 or 1024x768 or whatever without SDL_FULLSCREEN flag,
it gives me “Full screen mode” surrounded by black strip. After
several testing, I realise the resolution of the screen is that I
specify in lilo but not the resolution in X.

Check that your XFree86/Xorg.conf has a configuration for your desired
video resolution, SDL will behave as you described if it can not set
the desired video mode or it will choose a video mode from your X
config that’s close enough to the desired video res and draw black
around your screen surface. You can read more about it on John Hall’s
"Programming Linux Games" book, his web server
(http://www.overcode.net) seems to be down but I’ve seen him active on
IRC lately. Search for the book and download it, buy it, or check it
out from a local library.

Good luck.On Apr 12, 2005 6:21 AM, David Olofson wrote:

On Tuesday 12 April 2005 13.05, edison wrote:

Dear all,

I have my KDE installed and run several SDL programs on it. I have
used VESA (791, 1024x768 at 64l) specified in lilo.conf. My display
card is nVidia Geforce 2MX. In X environment, even the surface is
init as 800x600 or 1024x768 or whatever without SDL_FULLSCREEN flag,
it gives me “Full screen mode” surrounded by black strip. After
several testing, I realise the resolution of the screen is that I
specify in lilo but not the resolution in X.

Sounds like you have an SDL lib without X support, or maybe that it
can’t find or access X for some reason.

Some distros configure X to refuse connections from local root.

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl