mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Implement 'getFullscreenModes' more concisely
This commit is contained in:
parent
2af0ba66f1
commit
973055c1f5
@ -37,13 +37,10 @@ namespace sf::priv
|
||||
////////////////////////////////////////////////////////////
|
||||
std::vector<VideoMode> VideoModeImpl::getFullscreenModes()
|
||||
{
|
||||
VideoMode desktop = getDesktopMode();
|
||||
const VideoMode desktop = getDesktopMode();
|
||||
|
||||
// Return both portrait and landscape resolutions
|
||||
std::vector<VideoMode> modes;
|
||||
modes.push_back(desktop);
|
||||
modes.emplace_back(Vector2u(desktop.size.y, desktop.size.x), desktop.bitsPerPixel);
|
||||
return modes;
|
||||
return {desktop, VideoMode(Vector2u(desktop.size.y, desktop.size.x), desktop.bitsPerPixel)};
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,13 +35,10 @@ namespace sf::priv
|
||||
////////////////////////////////////////////////////////////
|
||||
std::vector<VideoMode> VideoModeImpl::getFullscreenModes()
|
||||
{
|
||||
VideoMode desktop = getDesktopMode();
|
||||
const VideoMode desktop = getDesktopMode();
|
||||
|
||||
// Return both portrait and landscape resolutions
|
||||
std::vector<VideoMode> modes;
|
||||
modes.push_back(desktop);
|
||||
modes.emplace_back(Vector2u(desktop.size.y, desktop.size.x), desktop.bitsPerPixel);
|
||||
return modes;
|
||||
return {desktop, VideoMode(Vector2u(desktop.size.y, desktop.size.x), desktop.bitsPerPixel)};
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user