mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-04 21:08:51 +02:00
misc: chore: Fix object creation
This commit is contained in:
@@ -435,12 +435,12 @@ namespace Ryujinx.Ava
|
||||
}
|
||||
|
||||
var colorType = e.IsBgra ? SKColorType.Bgra8888 : SKColorType.Rgba8888;
|
||||
using SKBitmap bitmap = new SKBitmap(new SKImageInfo(e.Width, e.Height, colorType, SKAlphaType.Premul));
|
||||
using SKBitmap bitmap = new(new SKImageInfo(e.Width, e.Height, colorType, SKAlphaType.Premul));
|
||||
|
||||
Marshal.Copy(e.Data, 0, bitmap.GetPixels(), e.Data.Length);
|
||||
|
||||
using SKBitmap bitmapToSave = new SKBitmap(bitmap.Width, bitmap.Height);
|
||||
using SKCanvas canvas = new SKCanvas(bitmapToSave);
|
||||
using SKBitmap bitmapToSave = new(bitmap.Width, bitmap.Height);
|
||||
using SKCanvas canvas = new(bitmapToSave);
|
||||
|
||||
canvas.Clear(SKColors.Black);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user