From 92b17fc228932b52864a14c5e7220d4a55dfe0b2 Mon Sep 17 00:00:00 2001 From: Xpl0itR Date: Mon, 30 Mar 2020 23:10:13 +0100 Subject: [PATCH] Set default width and height based on monitor resolution (#1046) --- Ryujinx/Ui/MainWindow.cs | 6 ++++++ Ryujinx/Ui/MainWindow.glade | 3 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index 094f6ff5c..2415280b6 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -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; diff --git a/Ryujinx/Ui/MainWindow.glade b/Ryujinx/Ui/MainWindow.glade index 931cd2a59..95beefb24 100644 --- a/Ryujinx/Ui/MainWindow.glade +++ b/Ryujinx/Ui/MainWindow.glade @@ -6,8 +6,6 @@ False Ryujinx center - 1280 - 760 @@ -399,7 +397,6 @@ - 1280 19 True False