mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-25 19:45:13 +00:00
Allow to start Ryujinx in wayland environment (#3516)
PrimaryMonitor is only available on X11 At some point it will be deprecated, this change support wayland
This commit is contained in:
parent
5d73a9f5fc
commit
55043c8afc
1 changed files with 3 additions and 3 deletions
|
@ -148,10 +148,10 @@ namespace Ryujinx.Ui
|
|||
|
||||
// Apply custom theme if needed.
|
||||
ThemeHelper.ApplyTheme();
|
||||
|
||||
Gdk.Monitor monitor = Display.GetMonitor(0);
|
||||
// Sets overridden fields.
|
||||
int monitorWidth = Display.PrimaryMonitor.Geometry.Width * Display.PrimaryMonitor.ScaleFactor;
|
||||
int monitorHeight = Display.PrimaryMonitor.Geometry.Height * Display.PrimaryMonitor.ScaleFactor;
|
||||
int monitorWidth = monitor.Geometry.Width * monitor.ScaleFactor;
|
||||
int monitorHeight = monitor.Geometry.Height * monitor.ScaleFactor;
|
||||
|
||||
DefaultWidth = monitorWidth < 1280 ? monitorWidth : 1280;
|
||||
DefaultHeight = monitorHeight < 760 ? monitorHeight : 760;
|
||||
|
|
Loading…
Reference in a new issue