Remove unnecessary helper function

This commit is contained in:
Chris Thrasher 2023-12-14 22:23:38 -07:00
parent 3cf25d1c2e
commit b9fdc1de7b
2 changed files with 2 additions and 9 deletions

View File

@ -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);

View File

@ -55,13 +55,6 @@ void scaleIn(T& in, id<WindowImplDelegateProtocol> delegate)
in /= static_cast<T>(delegate ? [delegate displayScaleFactor] : getDefaultScaleFactor());
}
template <class T>
void scaleInWidthHeight(T& in, id<WindowImplDelegateProtocol> delegate)
{
scaleIn(in.size.x, delegate);
scaleIn(in.size.y, delegate);
}
template <class T>
void scaleInXY(T& in, id<WindowImplDelegateProtocol> delegate)
{