misc: chore: Use explicit types & fix object creation

This commit is contained in:
KeatonTheBot
2026-05-30 16:26:50 -05:00
parent 9d3fecf334
commit 76a123b81d
454 changed files with 3042 additions and 2961 deletions
@@ -131,7 +131,7 @@ namespace Ryujinx.HLE.HOS.Services.Caps
filePath = GenerateFilePath(folderPath, applicationAlbumEntry, currentDateTime, hash);
}
using var bitmap = new SKBitmap(new SKImageInfo(ScreenshotWidth, ScreenshotHeight, SKColorType.Rgba8888));
using SKBitmap bitmap = new(new SKImageInfo(ScreenshotWidth, ScreenshotHeight, SKColorType.Rgba8888));
IntPtr pixels = bitmap.GetPixels();
@@ -142,8 +142,8 @@ namespace Ryujinx.HLE.HOS.Services.Caps
Marshal.Copy(screenshotData, 0, pixels, ScreenshotDataSize);
using var data = bitmap.Encode(SKEncodedImageFormat.Jpeg, 80);
using var file = File.OpenWrite(filePath);
using SKData data = bitmap.Encode(SKEncodedImageFormat.Jpeg, 80);
using FileStream file = File.OpenWrite(filePath);
data.SaveTo(file);
return ResultCode.Success;