On Mon, Dec 19, 2011 at 10:08 PM, Julian Mayer wrote: […]
On Mon, Dec 19, 2011 at 10:08 PM, Julian Mayer wrote:
first of all - thanks for SDL!
i've written a game that uses SDL for creating an OpenGL context under Windows and Linux. while everything seems to work fine on single-monitor systems, i've received a report from a linux user that the game actually spans both displays, while he only wants it displayed on the second display.
his setup: "Kubuntu 11.10 x64 with R600g video driver / Laptop Acer 7560G with external FullHD 27" display attached via HDMI. Configured via xrandr."
after some googling i've told him to try these variables:
but he said even launching the game with SDL_VIDEO_FULLSCREEN_HEAD=1 doesn't fix the issue...any suggestions?
one issue seems to be that SDL_GetVideoInfo() returns the resolution of BOTH displays combined, i.e. [url=tel:3520%20x%201080]3520 x 1080[/url] ... shouldn't it return the resolution of the primary display?
(the rationale here is that calling SDL_SetVideoMode(info->current_w, info->current_h, 24, SDL_OPENGL | SDL_FULLSCREEN) should yield a usable fullscreen context on the main display and not some weird problem context that spans two displays)
however that can't be responsible for all problems seen here as he said even when forcing the game to a lower resolution, windowed mode and FULLSCREEN_HEAD=1 it still spans both displays.
so are there any suggestions how to make SDL work fine with a multi monitor setup on linux?
btw: it seems like NONE of the environment variables listed above are documented