SFML community forums

Help => General => Topic started by: metulburr on November 25, 2013, 04:22:23 am

Title: determine multiple monitors or not
Post by: metulburr on November 25, 2013, 04:22:23 am
I know SFML does not yet support multiple monitors, more than one fullscreen, etc. I was however, looking for a method to determine whether there was a second montior hooked up or not. I have no idea how to test in windows, but the only thing i can think of in linux is xrandr.
metulburr@laptop:~$ xrandr
Screen 0: minimum 8 x 8, current 3200 x 1080, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
TV-0 disconnected (normal left inverted right x axis y axis)
LVDS-0 connected 1280x800+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
   1280x800       60.0*+
HDMI-0 connected 1920x1080+1280+0 (normal left inverted right x axis y axis) 886mm x 498mm
   1920x1080      60.0*+   59.9     24.0     30.0     30.0  
   1440x480       30.0  
   1360x768       60.0  
   1360x765       60.0  
   1280x1024      60.0  
   1280x720       60.0     59.9  
   1024x768       60.0  
   800x600        60.3  
   720x480        59.9     30.0  
   640x480        59.9     59.9  
metulburr@laptop:~$
Of course i am not exactly sure on how to parse the output in c++. Is there at least a method in SFML to test whether there is a lone monitor or not?
Title: Re: determine multiple monitors or not
Post by: Laurent on November 25, 2013, 07:54:00 am
Quote
Is there at least a method in SFML to test whether there is a lone monitor or not?
Nop.

Quote
Of course i am not exactly sure on how to parse the output in c++.
You don't have to parse that in your C++ program. You can use libxrandr, which provides the same functionality but through a C API ;)