mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Merge branch '2.6.x' into master
This commit is contained in:
commit
e192d6e6f8
@ -173,10 +173,9 @@
|
|||||||
- (void)setupFullscreenViewWithMode:(const sf::VideoMode&)mode
|
- (void)setupFullscreenViewWithMode:(const sf::VideoMode&)mode
|
||||||
{
|
{
|
||||||
// Create a screen-sized window on the main display
|
// Create a screen-sized window on the main display
|
||||||
sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
|
const sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
|
||||||
sf::priv::scaleInXY(desktop.size, nil);
|
NSRect windowRect = NSMakeRect(0, 0, desktop.size.x, desktop.size.y);
|
||||||
NSRect windowRect = NSMakeRect(0, 0, desktop.size.x, desktop.size.y);
|
m_window = [[SFWindow alloc]
|
||||||
m_window = [[SFWindow alloc]
|
|
||||||
initWithContentRect:windowRect
|
initWithContentRect:windowRect
|
||||||
styleMask:NSBorderlessWindowMask
|
styleMask:NSBorderlessWindowMask
|
||||||
backing:NSBackingStoreBuffered
|
backing:NSBackingStoreBuffered
|
||||||
@ -433,8 +432,7 @@
|
|||||||
{
|
{
|
||||||
// Special case when fullscreen: only resize the opengl view
|
// Special case when fullscreen: only resize the opengl view
|
||||||
// and make sure the requested size is not bigger than the window.
|
// and make sure the requested size is not bigger than the window.
|
||||||
sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
|
const sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
|
||||||
sf::priv::scaleInXY(desktop.size, nil);
|
|
||||||
|
|
||||||
size.x = std::min(size.x, desktop.size.x);
|
size.x = std::min(size.x, desktop.size.x);
|
||||||
size.y = std::min(size.y, desktop.size.y);
|
size.y = std::min(size.y, desktop.size.y);
|
||||||
|
Loading…
Reference in New Issue
Block a user