SFML community forums

Help => Window => Topic started by: wormpattern on October 21, 2012, 07:59:55 pm

Title: [sf::Videomodes] - Cant get modes into vector
Post by: wormpattern on October 21, 2012, 07:59:55 pm
Have you ever run into issue where function in SFML 2 to get availiable modes returns you:

availiableVideoModes [3]({width=3131961357 height=3131961357 bitsPerPixel=3131961357 },{width=3131961357 height=3131961357 bitsPerPixel=3131961357 },{width=3131961357 height=3131961357 bitsPerPixel=3131961357 }) std::vector >
max int values in vector? Interesting is why 3? I tried quick debugging without luck so in parallel I thought to raise question here.

code:

    std::vector<sf::VideoMode> availiableVideoModes;
    availiableVideoModes = sf::VideoMode::getFullscreenModes();
interesting is that

    desktopVideoMode = sf::VideoMode::getDesktopMode();
returns correct value.
Title: Re: [sf::Videomodes] - Cant get modes into vector
Post by: Nexus on October 21, 2012, 08:09:30 pm
Can you show a complete and minimal example that reproduces the problem?

Does it also happen if you output the values with std::cout?
Title: Re: [sf::Videomodes] - Cant get modes into vector
Post by: Laurent on October 21, 2012, 08:28:57 pm
It's probably the same problem as your sf::Font bug. There's something wrong in your configuration and random memory corruptions happen. I suggest to answer your other topic first, this one should automatically be solved then.
Title: Re: [sf::Videomodes] - Cant get modes into vector
Post by: wormpattern on October 21, 2012, 11:52:17 pm
Correct, I didnt used static libs.