SFML community forums

Help => Window => Topic started by: Lorcatar on January 11, 2015, 04:54:05 am

Title: Fullscreen problem
Post by: Lorcatar on January 11, 2015, 04:54:05 am
The following is fine
   
    sf::RenderWindow window(sf::VideoMode(600, 600),
                "SFML WORKS!", sf::Style::Fullscreen);



However the following is not fine. (resolution changed)
        sf::RenderWindow window(sf::VideoMode(1024, 768),
                "SFML WORKS!", sf::Style::Fullscreen);

The second one doesn't create a true fullscreen window. There is actually the windows explorer showing at the bottom, and all the icons are fully functional. What is the problem? Am I limited to a 1x1 aspect ratio when using sfml?
Title: Re: Fullscreen problem
Post by: Hiura on January 11, 2015, 09:54:48 am
Is your mode valid? (sf::VideoMode::isValid())

Use sf::VideoMode::getFullscreenModes() to get the list of valid settings.
Title: Re: Fullscreen problem
Post by: Lorcatar on January 11, 2015, 08:27:02 pm
Is your mode valid? (sf::VideoMode::isValid())

Use sf::VideoMode::getFullscreenModes() to get the list of valid settings.

Thank you, that solved the issue.
        std::vector<sf::VideoMode> i = sf::VideoMode::getFullscreenModes();
        sf::RenderWindow window(i.front(), "SFML WORKS!", sf::Style::Fullscreen);