misc: Remove dependency on System.Drawing.Common (#4082)

We only used it in one spot for DPI scaling factor.

This implements the same behaviour using gdiplus.

This remove 700KB of dependency to download and around 170KB unpacked.
This commit is contained in:
Mary-nyan 2022-12-09 18:00:53 +01:00 committed by GitHub
parent dca96122bf
commit 872f036d64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 77 additions and 3 deletions

View file

@ -1,6 +1,5 @@
using Ryujinx.Common.Logging;
using System;
using System.Drawing;
using System.Globalization;
using System.Runtime.InteropServices;
@ -51,7 +50,7 @@ namespace Ryujinx.Common.System
{
if (OperatingSystem.IsWindows())
{
userDpiScale = Graphics.FromHwnd(IntPtr.Zero).DpiX;
userDpiScale = GdiPlusHelper.GetDpiX(IntPtr.Zero);
}
else if (OperatingSystem.IsLinux())
{