From 9677ddaa5d8424604bdbf17496f8a878855a118d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 1 Dec 2022 21:54:41 +0000
Subject: [PATCH] nuget: bump SixLabors.ImageSharp from 1.0.4 to 2.1.3 (#3976)

* nuget: bump SixLabors.ImageSharp from 1.0.4 to 2.1.3

Bumps [SixLabors.ImageSharp](https://github.com/SixLabors/ImageSharp) from 1.0.4 to 2.1.3.
- [Release notes](https://github.com/SixLabors/ImageSharp/releases)
- [Commits](https://github.com/SixLabors/ImageSharp/compare/v1.0.4...v2.1.3)

---
updated-dependencies:
- dependency-name: SixLabors.ImageSharp
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update for 2.x changes

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mary <mary@mary.zone>
---
 Ryujinx.Ava/Ryujinx.Ava.csproj                                | 2 +-
 Ryujinx.Ava/Ui/Windows/IconColorPicker.cs                     | 2 +-
 .../Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs  | 4 ++--
 Ryujinx.HLE/Ryujinx.HLE.csproj                                | 2 +-
 Ryujinx/Ryujinx.csproj                                        | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Ryujinx.Ava/Ryujinx.Ava.csproj b/Ryujinx.Ava/Ryujinx.Ava.csproj
index c7b0eadc57..46b24dbdf9 100644
--- a/Ryujinx.Ava/Ryujinx.Ava.csproj
+++ b/Ryujinx.Ava/Ryujinx.Ava.csproj
@@ -38,7 +38,7 @@
     <PackageReference Include="Silk.NET.Vulkan.Extensions.KHR" Version="2.16.0" />
     <PackageReference Include="SPB" Version="0.0.4-build28" />
     <PackageReference Include="SharpZipLib" Version="1.4.1" />
-    <PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" />
+    <PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
   </ItemGroup>
 
   <ItemGroup>
diff --git a/Ryujinx.Ava/Ui/Windows/IconColorPicker.cs b/Ryujinx.Ava/Ui/Windows/IconColorPicker.cs
index 7cf4c2edef..14cd683134 100644
--- a/Ryujinx.Ava/Ui/Windows/IconColorPicker.cs
+++ b/Ryujinx.Ava/Ui/Windows/IconColorPicker.cs
@@ -125,7 +125,7 @@ namespace Ryujinx.Ava.Ui.Windows
 
         public static Bgra32[] GetBuffer(Image<Bgra32> image)
         {
-            return image.TryGetSinglePixelSpan(out var data) ? data.ToArray() : new Bgra32[0];
+            return image.DangerousTryGetSinglePixelMemory(out var data) ? data.ToArray() : new Bgra32[0];
         }
 
         private static int GetColorScore(Dictionary<int, int> dominantColorBin, int maxHitCount, PaletteColor color)
diff --git a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs
index 6c0955eccd..09f81f0f3e 100644
--- a/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs
+++ b/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardRendererBase.cs
@@ -549,12 +549,12 @@ namespace Ryujinx.HLE.HOS.Applets.SoftwareKeyboard
 
                 // Convert the pixel format used in the image to the one used in the Switch surface.
 
-                if (!_surface.TryGetSinglePixelSpan(out Span<Argb32> pixels))
+                if (!_surface.DangerousTryGetSinglePixelMemory(out Memory<Argb32> pixels))
                 {
                     return;
                 }
 
-                _bufferData = MemoryMarshal.AsBytes(pixels).ToArray();
+                _bufferData = MemoryMarshal.AsBytes(pixels.Span).ToArray();
                 Span<uint> dataConvert = MemoryMarshal.Cast<byte, uint>(_bufferData);
 
                 Debug.Assert(_bufferData.Length == _surfaceInfo.Size);
diff --git a/Ryujinx.HLE/Ryujinx.HLE.csproj b/Ryujinx.HLE/Ryujinx.HLE.csproj
index 1ec92a4499..f5d5042f2d 100644
--- a/Ryujinx.HLE/Ryujinx.HLE.csproj
+++ b/Ryujinx.HLE/Ryujinx.HLE.csproj
@@ -24,7 +24,7 @@
     <PackageReference Include="Concentus" Version="1.1.7" />
     <PackageReference Include="LibHac" Version="0.17.0" />
     <PackageReference Include="MsgPack.Cli" Version="1.0.1" />
-    <PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" />
+    <PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
     <PackageReference Include="SixLabors.ImageSharp.Drawing" Version="1.0.0-beta11" />
     <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.0" />
   </ItemGroup>
diff --git a/Ryujinx/Ryujinx.csproj b/Ryujinx/Ryujinx.csproj
index 31f130c4a5..0fbd7e3a71 100644
--- a/Ryujinx/Ryujinx.csproj
+++ b/Ryujinx/Ryujinx.csproj
@@ -27,7 +27,7 @@
     <PackageReference Include="OpenTK.Graphics" Version="4.7.5" />
     <PackageReference Include="SPB" Version="0.0.4-build28" />
     <PackageReference Include="SharpZipLib" Version="1.4.1" />
-    <PackageReference Include="SixLabors.ImageSharp" Version="1.0.4" />
+    <PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
   </ItemGroup>
 
   <ItemGroup>