diff options
Diffstat (limited to 'Ryujinx.Common/System/ForceDpiAware.cs')
-rw-r--r-- | Ryujinx.Common/System/ForceDpiAware.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Ryujinx.Common/System/ForceDpiAware.cs b/Ryujinx.Common/System/ForceDpiAware.cs index f29630a6..f1aa3e8e 100644 --- a/Ryujinx.Common/System/ForceDpiAware.cs +++ b/Ryujinx.Common/System/ForceDpiAware.cs @@ -44,7 +44,7 @@ namespace Ryujinx.Common.System } } - public static double GetWindowScaleFactor() + public static double GetActualScaleFactor() { double userDpiScale = 96.0; @@ -84,6 +84,13 @@ namespace Ryujinx.Common.System Logger.Warning?.Print(LogClass.Application, $"Couldn't determine monitor DPI: {e.Message}"); } + return userDpiScale; + } + + public static double GetWindowScaleFactor() + { + double userDpiScale = GetActualScaleFactor(); + return Math.Min(userDpiScale / _standardDpiScale, _maxScaleFactor); } } |