mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Remove unnecessary helper function
This commit is contained in:
parent
3cf25d1c2e
commit
b9fdc1de7b
@ -174,7 +174,7 @@
|
|||||||
{
|
{
|
||||||
// Create a screen-sized window on the main display
|
// Create a screen-sized window on the main display
|
||||||
sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
|
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);
|
NSRect windowRect = NSMakeRect(0, 0, desktop.size.x, desktop.size.y);
|
||||||
m_window = [[SFWindow alloc]
|
m_window = [[SFWindow alloc]
|
||||||
initWithContentRect:windowRect
|
initWithContentRect:windowRect
|
||||||
@ -434,7 +434,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();
|
sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
|
||||||
sf::priv::scaleInWidthHeight(desktop, nil);
|
sf::priv::scaleInXY(desktop.size, nil);
|
||||||
|
|
||||||
width = std::min(width, desktop.size.x);
|
width = std::min(width, desktop.size.x);
|
||||||
height = std::min(height, desktop.size.y);
|
height = std::min(height, desktop.size.y);
|
||||||
|
@ -55,13 +55,6 @@ void scaleIn(T& in, id<WindowImplDelegateProtocol> delegate)
|
|||||||
in /= static_cast<T>(delegate ? [delegate displayScaleFactor] : getDefaultScaleFactor());
|
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>
|
template <class T>
|
||||||
void scaleInXY(T& in, id<WindowImplDelegateProtocol> delegate)
|
void scaleInXY(T& in, id<WindowImplDelegateProtocol> delegate)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user