Set default width and height based on monitor resolution (#1046)

This commit is contained in:
Xpl0itR 2020-03-30 23:10:13 +01:00 committed by GitHub
parent f92d6868e7
commit 6a0a8b09b0
2 changed files with 6 additions and 3 deletions

View file

@ -91,6 +91,12 @@ namespace Ryujinx.Ui
{
builder.Autoconnect(this);
int monitorWidth = Display.PrimaryMonitor.Geometry.Width * Display.PrimaryMonitor.ScaleFactor;
int monitorHeight = Display.PrimaryMonitor.Geometry.Height * Display.PrimaryMonitor.ScaleFactor;
this.DefaultWidth = monitorWidth < 1280 ? monitorWidth : 1280;
this.DefaultHeight = monitorHeight < 760 ? monitorHeight : 760;
this.DeleteEvent += Window_Close;
_fullScreen.Activated += FullScreen_Toggled;