eterm: Use usable bounds instead of display bounds for window sizing.

This commit is contained in:
Martín Lucas Golini
2026-08-01 00:41:19 -03:00
parent 14207f228b
commit 24302ec9f1
+5 -5
View File
@@ -280,12 +280,12 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
defaultResourceScope().getFontService().setAntialiasing( fontAntialiasing.Get() );
Sizei winSize( width.Get(), height.Get() );
auto displaySize( currentDisplay->getUsableBounds().getSize() );
if ( displaySize.getWidth() > 0 && winSize.getWidth() >= displaySize.getWidth() )
winSize.setWidth( static_cast<int>( displaySize.getWidth() * 0.8 ) );
if ( winSize.getWidth() >= currentDisplay->getBounds().getWidth() )
winSize.setWidth( static_cast<int>( currentDisplay->getBounds().getWidth() * 0.8 ) );
if ( winSize.getHeight() >= currentDisplay->getBounds().getHeight() )
winSize.setHeight( static_cast<int>( currentDisplay->getBounds().getHeight() * 0.75 ) );
if ( displaySize.getHeight() > 0 && winSize.getHeight() >= displaySize.getHeight() )
winSize.setHeight( static_cast<int>( displaySize.getHeight() * 0.75 ) );
win = Engine::instance()->createWindow(
WindowSettings( winSize.getWidth(), winSize.getHeight(), "eterm", WindowStyle::Default,