Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: determine multiple monitors or not  (Read 883 times)

0 Members and 1 Guest are viewing this topic.

metulburr

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • Email
determine multiple monitors or not
« 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?
OS Ubuntu 13.04, Arch Linux, Gentoo, Windows 7/8
SFML 2.1
Ati Radeon HD 6770

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: determine multiple monitors or not
« Reply #1 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 ;)
Laurent Gomila - SFML developer