Gh0stViper
Gh0stViper

Reputation: 127

Get a list of possible screen resolutions

Might have a "brain freeze" going on, but can't figure out how to get available screen resolutions in SFML and C++. Is there a function in SFML or do I need to code it myself?

Upvotes: 1

Views: 666

Answers (1)

Swordfish
Swordfish

Reputation: 13144

static const std::vector& sf::VideoMode::getFullscreenModes():

static const std::vector& sf::VideoMode::getFullscreenModes() static

Retrieve all the video modes supported in fullscreen mode.

When creating a fullscreen window, the video mode is restricted to be compatible with what the graphics driver and monitor support. This function returns the complete list of all video modes that can be used in fullscreen mode. The returned array is sorted from best to worst, so that the first element will always give the best mode (higher width, height and bits-per-pixel).

Returns Array containing all the supported fullscreen modes

Upvotes: 4

Related Questions