Revert "Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)"

This reverts merge request !47
This commit is contained in:
GreemDev
2025-06-15 20:45:26 -05:00
parent faf9e3cdd7
commit 77a797f154
307 changed files with 1245 additions and 1016 deletions

View File

@@ -44,6 +44,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// CountAddOnContent(pid) -> u32
public ResultCode CountAddOnContent(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
return CountAddOnContentImpl(context, context.Device.Processes.ActiveApplication.ProgramId);
@@ -53,6 +57,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// ListAddOnContent(u32 start_index, u32 buffer_size, pid) -> (u32 count, buffer<u32>)
public ResultCode ListAddOnContent(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
return ListAddContentImpl(context, context.Device.Processes.ActiveApplication.ProgramId);
@@ -71,6 +79,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// GetAddOnContentBaseId(pid) -> u64
public ResultCode GetAddOnContentBaseId(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
return GetAddOnContentBaseIdImpl(context, context.Device.Processes.ActiveApplication.ProgramId);
@@ -89,6 +101,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// PrepareAddOnContent(u32 index, pid)
public ResultCode PrepareAddOnContent(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
return PrepareAddOnContentImpl(context, context.Device.Processes.ActiveApplication.ProgramId);
@@ -115,6 +131,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// GetAddOnContentListChangedEventWithProcessId(pid) -> handle<copy>
public ResultCode GetAddOnContentListChangedEventWithProcessId(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
// TODO: Found where stored value is used.
@@ -132,6 +152,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// NotifyMountAddOnContent(pid, u64 title_id)
public ResultCode NotifyMountAddOnContent(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
ulong aocTitleId = context.RequestData.ReadUInt64();
@@ -148,6 +172,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// NotifyUnmountAddOnContent(pid, u64 title_id)
public ResultCode NotifyUnmountAddOnContent(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
ulong aocTitleId = context.RequestData.ReadUInt64();
@@ -161,6 +189,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// CheckAddOnContentMountStatus(pid)
public ResultCode CheckAddOnContentMountStatus(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
// Then it does some internal checks and returns InvalidBufferSize if they fail.