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

Author Topic: [sf::Videomodes] - Cant get modes into vector  (Read 1062 times)

0 Members and 1 Guest are viewing this topic.

wormpattern

  • Newbie
  • *
  • Posts: 5
    • View Profile
[sf::Videomodes] - Cant get modes into vector
« 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.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6274
  • Thor Developer
    • View Profile
    • Bromeon
Re: [sf::Videomodes] - Cant get modes into vector
« Reply #1 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?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: [sf::Videomodes] - Cant get modes into vector
« Reply #2 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.
Laurent Gomila - SFML developer

wormpattern

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: [sf::Videomodes] - Cant get modes into vector
« Reply #3 on: October 21, 2012, 11:52:17 pm »
Correct, I didnt used static libs.