可能正在进行“大脑卡住”,但无法弄清楚如何在 SFML
和 C++
中获得可用的屏幕分辨率。 SFML
中是否有函数,还是我需要自己编写代码?
最佳答案
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
关于c++ - 获取可能的屏幕分辨率列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51572123/