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

Author Topic: SFML 2.0 - VideoMode querying issue  (Read 2016 times)

0 Members and 1 Guest are viewing this topic.

Frizi

  • Newbie
  • *
  • Posts: 4
    • View Profile
SFML 2.0 - VideoMode querying issue
« on: November 03, 2011, 10:59:39 pm »
Hi
I have a issue with Video Modes. I want to set window to fullscreen with the best resolution possible (as default setting).
So, my first approach to get this resolution was
Code: [Select]

sf::VideoMode vm = sf::VideoMode::GetDesktopMode();
std::cout << "w,h(" << vm.Width << ", " << vm.Height << ")" << std::endl;

but i got this error
Quote

Failed to use the XRandR extension while trying to get the desktop video modes
w,h(0, 0)


my later tests:

Code: [Select]

std::vector<sf::VideoMode> VModes = sf::VideoMode::GetFullscreenModes();
std::cout << "vm count: " << VModes.size() << std::endl;
BOOST_FOREACH(sf::VideoMode vm, VModes)
{
std::cout << "w,h(" << vm.Width << ", " << vm.Height << ")" << std::endl;
}


I got same error and output
Quote

vm count: 0


My system spec:
Fedora FC 15 (under KDE, because of working drivers), ATI Radeon HD 4850 with latest catalyst.

and small meaningful terminal copy-paste
Quote

[frizi@Frizi ~]$ xrandr
RandR extension missing

it is missing since migration to catalyst drivers from mesa (it doesn't support 3.30 shaders).

I have dual monitor setup working with xinerama.

After querying xinerama displays with this code
Code: [Select]

Display *mDisplay;
mDisplay = XOpenDisplay(XDisplayName(NULL));
if(XineramaIsActive(mDisplay))
{
XineramaScreenInfo *screens;
int num_screens;
int i = 0;
screens = XineramaQueryScreens(mDisplay,&num_screens);
for(i=0;i<num_screens;i++)
{
std::cout
<< "xinerama " << i << ": x,y,w,h("
<< screens[i].x_org << ", "
<< screens[i].y_org << ", "
<< screens[i].width << ", "
<< screens[i].height << ")"
<< std::endl;
}

}
XCloseDisplay(mDisplay);

i got
Quote

xinerama 0: x,y,w,h(0, 0, 1280, 1024)
xinerama 1: x,y,w,h(1280, 0, 1680, 1050)

It is totally true, but i want it with SFML. I had similar issues with xinerama under SDL, it detects my monitors as one big device without any better data.

Is there something i am doing wrong? Or maybe it is a bug that should be fixed?

edit:
I forgot to mention that i'm talking about latest SFML 2.0 snapshot.