diff --git a/src/SFML/Window/macOS/SFWindowController.mm b/src/SFML/Window/macOS/SFWindowController.mm index 17f8d5884..a909870f8 100644 --- a/src/SFML/Window/macOS/SFWindowController.mm +++ b/src/SFML/Window/macOS/SFWindowController.mm @@ -174,7 +174,7 @@ { // Create a screen-sized window on the main display sf::VideoMode desktop = sf::VideoMode::getDesktopMode(); - sf::priv::scaleInWidthHeight(desktop, nil); + sf::priv::scaleInXY(desktop.size, nil); NSRect windowRect = NSMakeRect(0, 0, desktop.size.x, desktop.size.y); m_window = [[SFWindow alloc] initWithContentRect:windowRect @@ -434,7 +434,7 @@ // Special case when fullscreen: only resize the opengl view // and make sure the requested size is not bigger than the window. sf::VideoMode desktop = sf::VideoMode::getDesktopMode(); - sf::priv::scaleInWidthHeight(desktop, nil); + sf::priv::scaleInXY(desktop.size, nil); width = std::min(width, desktop.size.x); height = std::min(height, desktop.size.y); diff --git a/src/SFML/Window/macOS/Scaling.h b/src/SFML/Window/macOS/Scaling.h index 36fff0c41..8c45564b2 100644 --- a/src/SFML/Window/macOS/Scaling.h +++ b/src/SFML/Window/macOS/Scaling.h @@ -55,13 +55,6 @@ void scaleIn(T& in, id delegate) in /= static_cast(delegate ? [delegate displayScaleFactor] : getDefaultScaleFactor()); } -template -void scaleInWidthHeight(T& in, id delegate) -{ - scaleIn(in.size.x, delegate); - scaleIn(in.size.y, delegate); -} - template void scaleInXY(T& in, id delegate) {