The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Problems with fullscreen + Xinerama
Haakon Riiser
Guest

When using multiple monitors in TwinView (Xinerama) mode, I have a
problem with fullscreen. SDL insists on centering the display between
the monitors, and it seems to be impossible to tell SDL to use just one
monitor. The environment variable SDL_VIDEO_FULLSCREEN_DISPLAY is
apparently there to fix this, but it has absolutely no effect, despite
SDL being built with xinerama support.

I have attached a minimal SDL fullscreen program (fullscreen.c):

$ gcc `sdl-config --cflags` fullscreen.c `sdl-config --libs`
$ export SDL_VIDEO_FULLSCREEN_DISPLAY=0
$ ./a.out

The displayed picture is still split between the monitors. Also tried
setting the environment variable to "1", but no difference.

I'm using a GeForce GTX 280 card with NVIDIA's own drivers
(v260.19.36). The SDL library is 1.2.14-10.fc14 (i.e., the one included
with Fedora 14). I can confirm that it is compiled with Xinerama
support:

$ strings /usr/lib64/libSDL.so | grep SDL_VIDEO_FULLSCREEN
SDL_VIDEO_FULLSCREEN_HEAD
SDL_VIDEO_FULLSCREEN_DISPLAY

(These would have been #ifdef'd away if SDL_VIDEO_DRIVER_X11_XINERAMA
was not set, so the library is properly built.)

Any ideas on how to fix this?

--
Haakon
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Problems with fullscreen + Xinerama
Haakon Riiser
Guest

On Sat, 14 May 2011 12:54:45 +0200, Haakon Riiser
wrote:
Quote:
When using multiple monitors in TwinView (Xinerama) mode, I have a
problem with fullscreen. SDL insists on centering the display between
the monitors, and it seems to be impossible to tell SDL to use just
one monitor. The environment variable SDL_VIDEO_FULLSCREEN_DISPLAY is
apparently there to fix this, but it has absolutely no effect,
despite
SDL being built with xinerama support.

Never mind, I figured out why the environment variable wasn't working:
nvidia-settings hadn't added a single-monitor metamode to xorg.conf.

In the "screen" section, I used to have this:

Option "metamodes" "CRT: nvidia-auto-select +1920+0, DFP:
nvidia-auto-select +0+0"

I added "; DFP: 1920x1200" to it, and now I can set
SDL_VIDEO_FULLSCREEN_DISPLAY=0 to make it work.

--
Haakon
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org