mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-22 10:31:13 +02:00
misc: chore: Remove redundant initializer, join declaration and assignment
This commit is contained in:
@@ -136,8 +136,6 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
|
||||
|
||||
ulong frameSize = (ulong)(1 + (useHighbitdepth ? 1 : 0)) * (yplaneSize + (2 * uvplaneSize));
|
||||
|
||||
ArrayPtr<byte> buf = ArrayPtr<byte>.Null;
|
||||
|
||||
// frame_size is stored in buffer_alloc_sz, which is an int. If it won't
|
||||
// fit, fail early.
|
||||
if (frameSize > int.MaxValue)
|
||||
@@ -212,7 +210,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
|
||||
SubsamplingX = ssX;
|
||||
SubsamplingY = ssY;
|
||||
|
||||
buf = BufferAlloc;
|
||||
ArrayPtr<byte> buf = BufferAlloc;
|
||||
if (useHighbitdepth)
|
||||
{
|
||||
// Store uint16 addresses when using 16bit framebuffers
|
||||
@@ -237,4 +235,4 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
|
||||
Marshal.FreeHGlobal(_pointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,11 +277,10 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
|
||||
public CodecErr Decode(MemoryAllocator allocator, ArrayPtr<byte> data)
|
||||
{
|
||||
ArrayPtr<byte> dataStart = data;
|
||||
CodecErr res;
|
||||
Array8<uint> frameSizes = new();
|
||||
int frameCount = 0;
|
||||
|
||||
res = Types.Decoder.ParseSuperframeIndex(data, (ulong)data.Length, ref frameSizes, out frameCount);
|
||||
CodecErr res = Types.Decoder.ParseSuperframeIndex(data, (ulong)data.Length, ref frameSizes, out frameCount);
|
||||
if (res != CodecErr.Ok)
|
||||
{
|
||||
return res;
|
||||
|
||||
@@ -795,10 +795,9 @@ namespace Ryujinx.UI.App.Common
|
||||
{
|
||||
ldnWebHost = DefaultLanPlayWebHost;
|
||||
}
|
||||
IEnumerable<LdnGameData> ldnGameDataArray = Array.Empty<LdnGameData>();
|
||||
using HttpClient httpClient = new HttpClient();
|
||||
string ldnGameDataArrayString = await httpClient.GetStringAsync($"https://{ldnWebHost}/api/public_games");
|
||||
ldnGameDataArray = JsonHelper.Deserialize(ldnGameDataArrayString, _ldnDataSerializerContext.IEnumerableLdnGameData);
|
||||
IEnumerable<LdnGameData> ldnGameDataArray = JsonHelper.Deserialize(ldnGameDataArrayString, _ldnDataSerializerContext.IEnumerableLdnGameData);
|
||||
var evt = new LdnGameDataReceivedEventArgs
|
||||
{
|
||||
LdnData = ldnGameDataArray
|
||||
|
||||
@@ -99,16 +99,13 @@ namespace Ryujinx.UI.Common.Helper
|
||||
Dictionary<ulong, ContentMetaData> updates =
|
||||
pfs.GetContentData(ContentMetaType.Patch, vfs, checkLevel);
|
||||
|
||||
Nca patchNca = null;
|
||||
Nca controlNca = null;
|
||||
|
||||
if (!updates.TryGetValue(applicationIdBase, out ContentMetaData content))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
patchNca = content.GetNcaByType(vfs.KeySet, ContentType.Program);
|
||||
controlNca = content.GetNcaByType(vfs.KeySet, ContentType.Control);
|
||||
Nca patchNca = content.GetNcaByType(vfs.KeySet, ContentType.Program);
|
||||
Nca controlNca = content.GetNcaByType(vfs.KeySet, ContentType.Control);
|
||||
|
||||
if (controlNca == null || patchNca == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user