mirror of
https://github.com/SFML/SFML.git
synced 2025-01-18 15:25:12 +08:00
parent
71a8ac7e70
commit
cb38877a8c
@ -88,7 +88,7 @@ For a closer look at breaking changes and how to migrate from SFML 2, check out
|
||||
- [Windows] Fixed F13-F24 and consumer key names not being returned on Windows (#2873)
|
||||
- [Windows] Changed `sf::Context::getFunction` to return `nullptr` when called on Windows without an active context (#2925)
|
||||
- [Linux] Fixed broken joystick axis mappings under Linux (#3167)
|
||||
- [macOS] Fixed how macOS fullscreen video modes are detected (#3151)
|
||||
- [macOS] Fixed how macOS fullscreen video modes are detected (#3151, #3348)
|
||||
- [macOS] Avoided unnecessary permission request prompts (#3232)
|
||||
- [Linux] Fixed DRM mode setting to use SFML window dimensions (#3310)
|
||||
|
||||
|
@ -40,18 +40,17 @@ namespace sf::priv
|
||||
////////////////////////////////////////////////////////////
|
||||
std::vector<VideoMode> VideoModeImpl::getFullscreenModes()
|
||||
{
|
||||
std::vector<VideoMode> modes;
|
||||
|
||||
// Retrieve all modes available for main screen only.
|
||||
CFArrayRef cgmodes = CGDisplayCopyAllDisplayModes(CGMainDisplayID(), nullptr);
|
||||
|
||||
if (cgmodes == nullptr)
|
||||
{
|
||||
sf::err() << "Couldn't get VideoMode for main display." << std::endl;
|
||||
return modes;
|
||||
return {};
|
||||
}
|
||||
|
||||
const VideoMode desktop = getDesktopMode();
|
||||
std::vector<VideoMode> modes = {desktop};
|
||||
|
||||
// Loop on each mode and convert it into a sf::VideoMode object.
|
||||
const CFIndex modesCount = CFArrayGetCount(cgmodes);
|
||||
|
Loading…
Reference in New Issue
Block a user