mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-06 22:18:57 +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));
|
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
|
// frame_size is stored in buffer_alloc_sz, which is an int. If it won't
|
||||||
// fit, fail early.
|
// fit, fail early.
|
||||||
if (frameSize > int.MaxValue)
|
if (frameSize > int.MaxValue)
|
||||||
@@ -212,7 +210,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
|
|||||||
SubsamplingX = ssX;
|
SubsamplingX = ssX;
|
||||||
SubsamplingY = ssY;
|
SubsamplingY = ssY;
|
||||||
|
|
||||||
buf = BufferAlloc;
|
ArrayPtr<byte> buf = BufferAlloc;
|
||||||
if (useHighbitdepth)
|
if (useHighbitdepth)
|
||||||
{
|
{
|
||||||
// Store uint16 addresses when using 16bit framebuffers
|
// Store uint16 addresses when using 16bit framebuffers
|
||||||
@@ -237,4 +235,4 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
|
|||||||
Marshal.FreeHGlobal(_pointer);
|
Marshal.FreeHGlobal(_pointer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,11 +277,10 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
|
|||||||
public CodecErr Decode(MemoryAllocator allocator, ArrayPtr<byte> data)
|
public CodecErr Decode(MemoryAllocator allocator, ArrayPtr<byte> data)
|
||||||
{
|
{
|
||||||
ArrayPtr<byte> dataStart = data;
|
ArrayPtr<byte> dataStart = data;
|
||||||
CodecErr res;
|
|
||||||
Array8<uint> frameSizes = new();
|
Array8<uint> frameSizes = new();
|
||||||
int frameCount = 0;
|
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)
|
if (res != CodecErr.Ok)
|
||||||
{
|
{
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
@@ -795,10 +795,9 @@ namespace Ryujinx.UI.App.Common
|
|||||||
{
|
{
|
||||||
ldnWebHost = DefaultLanPlayWebHost;
|
ldnWebHost = DefaultLanPlayWebHost;
|
||||||
}
|
}
|
||||||
IEnumerable<LdnGameData> ldnGameDataArray = Array.Empty<LdnGameData>();
|
|
||||||
using HttpClient httpClient = new HttpClient();
|
using HttpClient httpClient = new HttpClient();
|
||||||
string ldnGameDataArrayString = await httpClient.GetStringAsync($"https://{ldnWebHost}/api/public_games");
|
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
|
var evt = new LdnGameDataReceivedEventArgs
|
||||||
{
|
{
|
||||||
LdnData = ldnGameDataArray
|
LdnData = ldnGameDataArray
|
||||||
|
|||||||
@@ -99,16 +99,13 @@ namespace Ryujinx.UI.Common.Helper
|
|||||||
Dictionary<ulong, ContentMetaData> updates =
|
Dictionary<ulong, ContentMetaData> updates =
|
||||||
pfs.GetContentData(ContentMetaType.Patch, vfs, checkLevel);
|
pfs.GetContentData(ContentMetaType.Patch, vfs, checkLevel);
|
||||||
|
|
||||||
Nca patchNca = null;
|
|
||||||
Nca controlNca = null;
|
|
||||||
|
|
||||||
if (!updates.TryGetValue(applicationIdBase, out ContentMetaData content))
|
if (!updates.TryGetValue(applicationIdBase, out ContentMetaData content))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
patchNca = content.GetNcaByType(vfs.KeySet, ContentType.Program);
|
Nca patchNca = content.GetNcaByType(vfs.KeySet, ContentType.Program);
|
||||||
controlNca = content.GetNcaByType(vfs.KeySet, ContentType.Control);
|
Nca controlNca = content.GetNcaByType(vfs.KeySet, ContentType.Control);
|
||||||
|
|
||||||
if (controlNca == null || patchNca == null)
|
if (controlNca == null || patchNca == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user