mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-12-27 02:53:04 +00:00
Format fixes
This commit is contained in:
parent
eb88fc1d06
commit
95a3ed9705
28 changed files with 86 additions and 100 deletions
|
@ -236,28 +236,14 @@ dotnet_naming_style.IPascalCase.required_suffix =
|
||||||
dotnet_naming_style.IPascalCase.word_separator =
|
dotnet_naming_style.IPascalCase.word_separator =
|
||||||
dotnet_naming_style.IPascalCase.capitalization = pascal_case
|
dotnet_naming_style.IPascalCase.capitalization = pascal_case
|
||||||
|
|
||||||
# TODO:
|
|
||||||
# .NET 8 migration (new warnings are caused by the NET 8 C# compiler and analyzer)
|
|
||||||
# The following info messages might need to be fixed in the source code instead of hiding the actual message
|
|
||||||
# Without the following lines, dotnet format would fail
|
|
||||||
# Disable "Use collection initializers or expressions"
|
# Disable "Use collection initializers or expressions"
|
||||||
dotnet_diagnostic.IDE0028.severity = none
|
dotnet_diagnostic.IDE0028.severity = none
|
||||||
# Disable "Use collection expression for stackalloc"
|
# Disable "Use collection expression for stackalloc"
|
||||||
dotnet_diagnostic.IDE0302.severity = none
|
dotnet_diagnostic.IDE0302.severity = none
|
||||||
# Disable "Use collection expression for fluent"
|
# Disable "Use collection expression for fluent"
|
||||||
dotnet_diagnostic.IDE0305.severity = none
|
dotnet_diagnostic.IDE0305.severity = none
|
||||||
# Disable "'new' expression can be simplified"
|
|
||||||
dotnet_diagnostic.IDE0090.severity = none
|
|
||||||
# Disable "Use primary constructor"
|
# Disable "Use primary constructor"
|
||||||
dotnet_diagnostic.IDE0290.severity = none
|
dotnet_diagnostic.IDE0290.severity = none
|
||||||
# Disable "Member '' does not access instance data and can be marked as static"
|
|
||||||
dotnet_diagnostic.CA1822.severity = none
|
|
||||||
# Disable "Change type of field '' from '' to '' for improved performance"
|
|
||||||
dotnet_diagnostic.CA1859.severity = none
|
|
||||||
# Disable "Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array"
|
|
||||||
dotnet_diagnostic.CA1861.severity = none
|
|
||||||
# Disable "Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'"
|
|
||||||
dotnet_diagnostic.CA1862.severity = none
|
|
||||||
|
|
||||||
[src/Ryujinx/UI/ViewModels/**.cs]
|
[src/Ryujinx/UI/ViewModels/**.cs]
|
||||||
# Disable "mark members as static" rule for ViewModels
|
# Disable "mark members as static" rule for ViewModels
|
||||||
|
|
|
@ -839,7 +839,7 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
|
||||||
{
|
{
|
||||||
dest.NumberLocal(_intervals.Count);
|
dest.NumberLocal(_intervals.Count);
|
||||||
|
|
||||||
LiveInterval interval = new LiveInterval(dest);
|
LiveInterval interval = new(dest);
|
||||||
_intervals.Add(interval);
|
_intervals.Add(interval);
|
||||||
|
|
||||||
SetVisited(dest);
|
SetVisited(dest);
|
||||||
|
|
|
@ -124,7 +124,7 @@ namespace ARMeilleure.Translation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="node">The node to search for values within</param>
|
/// <param name="node">The node to search for values within</param>
|
||||||
/// <param name="list">The list to add values to</param>
|
/// <param name="list">The list to add values to</param>
|
||||||
private void AddToList(IntervalTreeNode<TK, TV> node, List<TV> list)
|
private static void AddToList(IntervalTreeNode<TK, TV> node, List<TV> list)
|
||||||
{
|
{
|
||||||
if (node == null)
|
if (node == null)
|
||||||
{
|
{
|
||||||
|
@ -175,7 +175,7 @@ namespace ARMeilleure.Translation
|
||||||
/// <param name="end">End of the range</param>
|
/// <param name="end">End of the range</param>
|
||||||
/// <param name="overlaps">Overlaps array to place results in</param>
|
/// <param name="overlaps">Overlaps array to place results in</param>
|
||||||
/// <param name="overlapCount">Overlaps count to update</param>
|
/// <param name="overlapCount">Overlaps count to update</param>
|
||||||
private void GetKeys(IntervalTreeNode<TK, TV> node, TK start, TK end, ref TK[] overlaps, ref int overlapCount)
|
private static void GetKeys(IntervalTreeNode<TK, TV> node, TK start, TK end, ref TK[] overlaps, ref int overlapCount)
|
||||||
{
|
{
|
||||||
if (node == null || start.CompareTo(node.Max) >= 0)
|
if (node == null || start.CompareTo(node.Max) >= 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace ARMeilleure.Translation
|
||||||
// This is required because we have a implicit context load at the start of the function,
|
// This is required because we have a implicit context load at the start of the function,
|
||||||
// but if there is a jump to the start of the function, the context load would trash the modified values.
|
// but if there is a jump to the start of the function, the context load would trash the modified values.
|
||||||
// Here we insert a new entry block that will jump to the existing entry block.
|
// Here we insert a new entry block that will jump to the existing entry block.
|
||||||
BasicBlock newEntry = new BasicBlock(cfg.Blocks.Count);
|
BasicBlock newEntry = new(cfg.Blocks.Count);
|
||||||
|
|
||||||
cfg.UpdateEntry(newEntry);
|
cfg.UpdateEntry(newEntry);
|
||||||
}
|
}
|
||||||
|
|
|
@ -436,7 +436,7 @@ namespace Ryujinx.Audio.Renderer.Server
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
PoolMapper poolMapper = new PoolMapper(_processHandle, _memoryPools, _behaviourContext.IsMemoryPoolForceMappingEnabled());
|
PoolMapper poolMapper = new(_processHandle, _memoryPools, _behaviourContext.IsMemoryPoolForceMappingEnabled());
|
||||||
|
|
||||||
result = stateUpdater.UpdateVoices(_voiceContext, poolMapper);
|
result = stateUpdater.UpdateVoices(_voiceContext, poolMapper);
|
||||||
|
|
||||||
|
|
|
@ -122,7 +122,7 @@ namespace Ryujinx.Common.Collections
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="node">The node to search for RangeNodes within</param>
|
/// <param name="node">The node to search for RangeNodes within</param>
|
||||||
/// <param name="list">The list to add RangeNodes to</param>
|
/// <param name="list">The list to add RangeNodes to</param>
|
||||||
private void AddToList(IntervalTreeNode<TKey, TValue> node, List<RangeNode<TKey, TValue>> list)
|
private static void AddToList(IntervalTreeNode<TKey, TValue> node, List<RangeNode<TKey, TValue>> list)
|
||||||
{
|
{
|
||||||
if (node == null)
|
if (node == null)
|
||||||
{
|
{
|
||||||
|
@ -173,7 +173,7 @@ namespace Ryujinx.Common.Collections
|
||||||
/// <param name="end">End of the range</param>
|
/// <param name="end">End of the range</param>
|
||||||
/// <param name="overlaps">Overlaps array to place results in</param>
|
/// <param name="overlaps">Overlaps array to place results in</param>
|
||||||
/// <param name="overlapCount">Overlaps count to update</param>
|
/// <param name="overlapCount">Overlaps count to update</param>
|
||||||
private void GetValues(IntervalTreeNode<TKey, TValue> node, TKey start, TKey end, ref TValue[] overlaps, ref int overlapCount)
|
private static void GetValues(IntervalTreeNode<TKey, TValue> node, TKey start, TKey end, ref TValue[] overlaps, ref int overlapCount)
|
||||||
{
|
{
|
||||||
if (node == null || start.CompareTo(node.Max) >= 0)
|
if (node == null || start.CompareTo(node.Max) >= 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -184,7 +184,7 @@ namespace Ryujinx.Common.Collections
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="node">The node to search for nodes within</param>
|
/// <param name="node">The node to search for nodes within</param>
|
||||||
/// <param name="list">The list to add node to</param>
|
/// <param name="list">The list to add node to</param>
|
||||||
private void AddToList(Node<TKey, TValue> node, List<KeyValuePair<TKey, TValue>> list)
|
private static void AddToList(Node<TKey, TValue> node, List<KeyValuePair<TKey, TValue>> list)
|
||||||
{
|
{
|
||||||
if (node == null)
|
if (node == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,7 +163,7 @@ namespace Ryujinx.Common.Extensions
|
||||||
// Not enough data in the current segment, try to peek for the data we need.
|
// Not enough data in the current segment, try to peek for the data we need.
|
||||||
T buffer = default;
|
T buffer = default;
|
||||||
|
|
||||||
Span<byte> tempSpan = new Span<byte>(&buffer, sizeof(T));
|
Span<byte> tempSpan = new(&buffer, sizeof(T));
|
||||||
|
|
||||||
if (!reader.TryCopyTo(tempSpan))
|
if (!reader.TryCopyTo(tempSpan))
|
||||||
{
|
{
|
||||||
|
|
|
@ -857,7 +857,7 @@ namespace Ryujinx.Cpu.LightningJit.CodeGen.Arm64
|
||||||
|
|
||||||
public readonly void PrfmI(Operand rn, int imm, uint type, uint target, uint policy)
|
public readonly void PrfmI(Operand rn, int imm, uint type, uint target, uint policy)
|
||||||
{
|
{
|
||||||
Operand rt = new Operand((int)EncodeTypeTargetPolicy(type, target, policy), RegisterType.Integer, OperandType.I32);
|
Operand rt = new((int)EncodeTypeTargetPolicy(type, target, policy), RegisterType.Integer, OperandType.I32);
|
||||||
WriteInstruction(0xf9800000u | (EncodeUImm12(imm, 3) << 10), rt, rn);
|
WriteInstruction(0xf9800000u | (EncodeUImm12(imm, 3) << 10), rt, rn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -868,7 +868,7 @@ namespace Ryujinx.Cpu.LightningJit.CodeGen.Arm64
|
||||||
|
|
||||||
public readonly void Prfum(Operand rn, int imm, uint type, uint target, uint policy)
|
public readonly void Prfum(Operand rn, int imm, uint type, uint target, uint policy)
|
||||||
{
|
{
|
||||||
Operand rt = new Operand((int)EncodeTypeTargetPolicy(type, target, policy), RegisterType.Integer, OperandType.I32);
|
Operand rt = new((int)EncodeTypeTargetPolicy(type, target, policy), RegisterType.Integer, OperandType.I32);
|
||||||
WriteInstruction(0xf8800000u | (EncodeSImm9(imm) << 12), rt, rn);
|
WriteInstruction(0xf8800000u | (EncodeSImm9(imm) << 12), rt, rn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1013,7 +1013,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
bool isImage,
|
bool isImage,
|
||||||
out bool isNew)
|
out bool isNew)
|
||||||
{
|
{
|
||||||
CacheEntryFromPoolKey key = new CacheEntryFromPoolKey(isImage, bindingInfo, texturePool, samplerPool);
|
CacheEntryFromPoolKey key = new(isImage, bindingInfo, texturePool, samplerPool);
|
||||||
|
|
||||||
isNew = !_cacheFromPool.TryGetValue(key, out CacheEntry entry);
|
isNew = !_cacheFromPool.TryGetValue(key, out CacheEntry entry);
|
||||||
|
|
||||||
|
@ -1056,7 +1056,7 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||||
ref BufferBounds textureBufferBounds,
|
ref BufferBounds textureBufferBounds,
|
||||||
out bool isNew)
|
out bool isNew)
|
||||||
{
|
{
|
||||||
CacheEntryFromBufferKey key = new CacheEntryFromBufferKey(
|
CacheEntryFromBufferKey key = new(
|
||||||
isImage,
|
isImage,
|
||||||
bindingInfo,
|
bindingInfo,
|
||||||
texturePool,
|
texturePool,
|
||||||
|
|
|
@ -663,7 +663,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||||
/// <param name="overlapsCount">Total of overlaps</param>
|
/// <param name="overlapsCount">Total of overlaps</param>
|
||||||
private void CreateBufferAligned(ulong address, ulong size, BufferStage stage, bool sparseCompatible, Buffer[] overlaps, int overlapsCount)
|
private void CreateBufferAligned(ulong address, ulong size, BufferStage stage, bool sparseCompatible, Buffer[] overlaps, int overlapsCount)
|
||||||
{
|
{
|
||||||
Buffer newBuffer = new Buffer(_context, _physicalMemory, address, size, stage, sparseCompatible, overlaps.Take(overlapsCount));
|
Buffer newBuffer = new(_context, _physicalMemory, address, size, stage, sparseCompatible, overlaps.Take(overlapsCount));
|
||||||
|
|
||||||
lock (_buffers)
|
lock (_buffers)
|
||||||
{
|
{
|
||||||
|
|
|
@ -430,7 +430,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
||||||
|
|
||||||
BufferMigration oldMigration = ranges._source;
|
BufferMigration oldMigration = ranges._source;
|
||||||
|
|
||||||
BufferMigrationSpan span = new BufferMigrationSpan(ranges._parent, ranges._flushAction, oldMigration);
|
BufferMigrationSpan span = new(ranges._parent, ranges._flushAction, oldMigration);
|
||||||
ranges._parent.IncrementReferenceCount();
|
ranges._parent.IncrementReferenceCount();
|
||||||
|
|
||||||
if (_source == null)
|
if (_source == null)
|
||||||
|
|
|
@ -154,7 +154,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
stages |= PipelineStageFlags.DrawIndirectBit;
|
stages |= PipelineStageFlags.DrawIndirectBit;
|
||||||
}
|
}
|
||||||
|
|
||||||
MemoryBarrier barrier = new MemoryBarrier()
|
MemoryBarrier barrier = new()
|
||||||
{
|
{
|
||||||
SType = StructureType.MemoryBarrier,
|
SType = StructureType.MemoryBarrier,
|
||||||
SrcAccessMask = access,
|
SrcAccessMask = access,
|
||||||
|
|
|
@ -207,14 +207,14 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
fixed (SparseMemoryBind* pMemoryBinds = memoryBinds)
|
fixed (SparseMemoryBind* pMemoryBinds = memoryBinds)
|
||||||
{
|
{
|
||||||
SparseBufferMemoryBindInfo bufferBind = new SparseBufferMemoryBindInfo()
|
SparseBufferMemoryBindInfo bufferBind = new()
|
||||||
{
|
{
|
||||||
Buffer = buffer,
|
Buffer = buffer,
|
||||||
BindCount = (uint)memoryBinds.Length,
|
BindCount = (uint)memoryBinds.Length,
|
||||||
PBinds = pMemoryBinds
|
PBinds = pMemoryBinds
|
||||||
};
|
};
|
||||||
|
|
||||||
BindSparseInfo bindSparseInfo = new BindSparseInfo()
|
BindSparseInfo bindSparseInfo = new()
|
||||||
{
|
{
|
||||||
SType = StructureType.BindSparseInfo,
|
SType = StructureType.BindSparseInfo,
|
||||||
BufferBindCount = 1,
|
BufferBindCount = 1,
|
||||||
|
|
|
@ -694,7 +694,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
_vertexBufferUpdater.Commit(Cbs);
|
_vertexBufferUpdater.Commit(Cbs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetAlphaTest(bool enable, float reference, CompareOp op)
|
public static void SetAlphaTest(bool enable, float reference, CompareOp op)
|
||||||
{
|
{
|
||||||
// This is currently handled using shader specialization, as Vulkan does not support alpha test.
|
// This is currently handled using shader specialization, as Vulkan does not support alpha test.
|
||||||
// In the future, we may want to use this to write the reference value into the support buffer,
|
// In the future, we may want to use this to write the reference value into the support buffer,
|
||||||
|
@ -891,12 +891,12 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
// TODO: Default levels (likely needs emulation on shaders?)
|
// TODO: Default levels (likely needs emulation on shaders?)
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPointParameters(float size, bool isProgramPointSize, bool enablePointSprite, Origin origin)
|
public static void SetPointParameters(float size, bool isProgramPointSize, bool enablePointSprite, Origin origin)
|
||||||
{
|
{
|
||||||
// TODO.
|
// TODO.
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetPolygonMode(PolygonMode frontMode, PolygonMode backMode)
|
public static void SetPolygonMode(PolygonMode frontMode, PolygonMode backMode)
|
||||||
{
|
{
|
||||||
// TODO.
|
// TODO.
|
||||||
}
|
}
|
||||||
|
@ -1142,7 +1142,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
_descriptorSetUpdater.SetUniformBuffers(CommandBuffer, buffers);
|
_descriptorSetUpdater.SetUniformBuffers(CommandBuffer, buffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetUserClipDistance(int index, bool enableClip)
|
public static void SetUserClipDistance(int index, bool enableClip)
|
||||||
{
|
{
|
||||||
// TODO.
|
// TODO.
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,7 +381,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
return templates;
|
return templates;
|
||||||
}
|
}
|
||||||
|
|
||||||
private PipelineStageFlags GetPipelineStages(ResourceStages stages)
|
private static PipelineStageFlags GetPipelineStages(ResourceStages stages)
|
||||||
{
|
{
|
||||||
PipelineStageFlags result = 0;
|
PipelineStageFlags result = 0;
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private (PipelineStageFlags Buffer, PipelineStageFlags Texture) BuildIncoherentStages(ReadOnlyCollection<ResourceUsageCollection> setUsages)
|
private static (PipelineStageFlags Buffer, PipelineStageFlags Texture) BuildIncoherentStages(ReadOnlyCollection<ResourceUsageCollection> setUsages)
|
||||||
{
|
{
|
||||||
PipelineStageFlags buffer = PipelineStageFlags.None;
|
PipelineStageFlags buffer = PipelineStageFlags.None;
|
||||||
PipelineStageFlags texture = PipelineStageFlags.None;
|
PipelineStageFlags texture = PipelineStageFlags.None;
|
||||||
|
|
|
@ -202,7 +202,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
|
|
||||||
bool supportsPushDescriptors = _physicalDevice.IsDeviceExtensionPresent(KhrPushDescriptor.ExtensionName);
|
bool supportsPushDescriptors = _physicalDevice.IsDeviceExtensionPresent(KhrPushDescriptor.ExtensionName);
|
||||||
|
|
||||||
PhysicalDevicePushDescriptorPropertiesKHR propertiesPushDescriptor = new PhysicalDevicePushDescriptorPropertiesKHR()
|
PhysicalDevicePushDescriptorPropertiesKHR propertiesPushDescriptor = new()
|
||||||
{
|
{
|
||||||
SType = StructureType.PhysicalDevicePushDescriptorPropertiesKhr
|
SType = StructureType.PhysicalDevicePushDescriptorPropertiesKhr
|
||||||
};
|
};
|
||||||
|
|
|
@ -509,7 +509,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GenerateRandomEntropy()
|
private static void GenerateRandomEntropy()
|
||||||
{
|
{
|
||||||
// TODO.
|
// TODO.
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
return handleTable.GenerateHandle(process, out handle);
|
return handleTable.GenerateHandle(process, out handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Result StartProcess(int handle, int priority, int cpuCore, ulong mainThreadStackSize)
|
public static Result StartProcess(int handle, int priority, int cpuCore, ulong mainThreadStackSize)
|
||||||
{
|
{
|
||||||
KProcess process = KernelStatic.GetCurrentProcess().HandleTable.GetObject<KProcess>(handle);
|
KProcess process = KernelStatic.GetCurrentProcess().HandleTable.GetObject<KProcess>(handle);
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x5f)]
|
[Svc(0x5f)]
|
||||||
public Result FlushProcessDataCache(int processHandle, ulong address, ulong size)
|
public static Result FlushProcessDataCache(int processHandle, ulong address, ulong size)
|
||||||
{
|
{
|
||||||
// FIXME: This needs to be implemented as ARMv7 doesn't have any way to do cache maintenance operations on EL0.
|
// FIXME: This needs to be implemented as ARMv7 doesn't have any way to do cache maintenance operations on EL0.
|
||||||
// As we don't support (and don't actually need) to flush the cache, this is stubbed.
|
// As we don't support (and don't actually need) to flush the cache, this is stubbed.
|
||||||
|
@ -263,7 +263,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x22)]
|
[Svc(0x22)]
|
||||||
public Result SendSyncRequestWithUserBuffer(
|
public static Result SendSyncRequestWithUserBuffer(
|
||||||
[PointerSized] ulong messagePtr,
|
[PointerSized] ulong messagePtr,
|
||||||
[PointerSized] ulong messageSize,
|
[PointerSized] ulong messageSize,
|
||||||
int handle)
|
int handle)
|
||||||
|
@ -901,7 +901,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(2)]
|
[Svc(2)]
|
||||||
public Result SetMemoryPermission([PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
public static Result SetMemoryPermission([PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
||||||
{
|
{
|
||||||
if (!PageAligned(address))
|
if (!PageAligned(address))
|
||||||
{
|
{
|
||||||
|
@ -934,7 +934,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(3)]
|
[Svc(3)]
|
||||||
public Result SetMemoryAttribute(
|
public static Result SetMemoryAttribute(
|
||||||
[PointerSized] ulong address,
|
[PointerSized] ulong address,
|
||||||
[PointerSized] ulong size,
|
[PointerSized] ulong size,
|
||||||
MemoryAttribute attributeMask,
|
MemoryAttribute attributeMask,
|
||||||
|
@ -983,7 +983,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(4)]
|
[Svc(4)]
|
||||||
public Result MapMemory([PointerSized] ulong dst, [PointerSized] ulong src, [PointerSized] ulong size)
|
public static Result MapMemory([PointerSized] ulong dst, [PointerSized] ulong src, [PointerSized] ulong size)
|
||||||
{
|
{
|
||||||
if (!PageAligned(src | dst))
|
if (!PageAligned(src | dst))
|
||||||
{
|
{
|
||||||
|
@ -1020,7 +1020,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(5)]
|
[Svc(5)]
|
||||||
public Result UnmapMemory([PointerSized] ulong dst, [PointerSized] ulong src, [PointerSized] ulong size)
|
public static Result UnmapMemory([PointerSized] ulong dst, [PointerSized] ulong src, [PointerSized] ulong size)
|
||||||
{
|
{
|
||||||
if (!PageAligned(src | dst))
|
if (!PageAligned(src | dst))
|
||||||
{
|
{
|
||||||
|
@ -1057,7 +1057,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(6)]
|
[Svc(6)]
|
||||||
public Result QueryMemory([PointerSized] ulong infoPtr, [PointerSized] out ulong pageInfo, [PointerSized] ulong address)
|
public static Result QueryMemory([PointerSized] ulong infoPtr, [PointerSized] out ulong pageInfo, [PointerSized] ulong address)
|
||||||
{
|
{
|
||||||
Result result = QueryMemory(out MemoryInfo info, out pageInfo, address);
|
Result result = QueryMemory(out MemoryInfo info, out pageInfo, address);
|
||||||
|
|
||||||
|
@ -1071,7 +1071,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Result QueryMemory(out MemoryInfo info, out ulong pageInfo, ulong address)
|
public static Result QueryMemory(out MemoryInfo info, out ulong pageInfo, ulong address)
|
||||||
{
|
{
|
||||||
KProcess process = KernelStatic.GetCurrentProcess();
|
KProcess process = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -1092,7 +1092,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x13)]
|
[Svc(0x13)]
|
||||||
public Result MapSharedMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
public static Result MapSharedMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
||||||
{
|
{
|
||||||
if (!PageAligned(address))
|
if (!PageAligned(address))
|
||||||
{
|
{
|
||||||
|
@ -1139,7 +1139,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x14)]
|
[Svc(0x14)]
|
||||||
public Result UnmapSharedMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size)
|
public static Result UnmapSharedMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size)
|
||||||
{
|
{
|
||||||
if (!PageAligned(address))
|
if (!PageAligned(address))
|
||||||
{
|
{
|
||||||
|
@ -1244,7 +1244,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x51)]
|
[Svc(0x51)]
|
||||||
public Result MapTransferMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
public static Result MapTransferMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size, KMemoryPermission permission)
|
||||||
{
|
{
|
||||||
if (!PageAligned(address))
|
if (!PageAligned(address))
|
||||||
{
|
{
|
||||||
|
@ -1291,7 +1291,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x52)]
|
[Svc(0x52)]
|
||||||
public Result UnmapTransferMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size)
|
public static Result UnmapTransferMemory(int handle, [PointerSized] ulong address, [PointerSized] ulong size)
|
||||||
{
|
{
|
||||||
if (!PageAligned(address))
|
if (!PageAligned(address))
|
||||||
{
|
{
|
||||||
|
@ -1332,7 +1332,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x2c)]
|
[Svc(0x2c)]
|
||||||
public Result MapPhysicalMemory([PointerSized] ulong address, [PointerSized] ulong size)
|
public static Result MapPhysicalMemory([PointerSized] ulong address, [PointerSized] ulong size)
|
||||||
{
|
{
|
||||||
if (!PageAligned(address))
|
if (!PageAligned(address))
|
||||||
{
|
{
|
||||||
|
@ -1368,7 +1368,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x2d)]
|
[Svc(0x2d)]
|
||||||
public Result UnmapPhysicalMemory([PointerSized] ulong address, [PointerSized] ulong size)
|
public static Result UnmapPhysicalMemory([PointerSized] ulong address, [PointerSized] ulong size)
|
||||||
{
|
{
|
||||||
if (!PageAligned(address))
|
if (!PageAligned(address))
|
||||||
{
|
{
|
||||||
|
@ -1445,7 +1445,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x4c)]
|
[Svc(0x4c)]
|
||||||
public Result ControlCodeMemory(
|
public static Result ControlCodeMemory(
|
||||||
int handle,
|
int handle,
|
||||||
CodeMemoryOperation op,
|
CodeMemoryOperation op,
|
||||||
ulong address,
|
ulong address,
|
||||||
|
@ -1524,7 +1524,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x73)]
|
[Svc(0x73)]
|
||||||
public Result SetProcessMemoryPermission(
|
public static Result SetProcessMemoryPermission(
|
||||||
int handle,
|
int handle,
|
||||||
ulong src,
|
ulong src,
|
||||||
ulong size,
|
ulong size,
|
||||||
|
@ -1566,7 +1566,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x74)]
|
[Svc(0x74)]
|
||||||
public Result MapProcessMemory(
|
public static Result MapProcessMemory(
|
||||||
[PointerSized] ulong dst,
|
[PointerSized] ulong dst,
|
||||||
int handle,
|
int handle,
|
||||||
ulong src,
|
ulong src,
|
||||||
|
@ -1623,7 +1623,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x75)]
|
[Svc(0x75)]
|
||||||
public Result UnmapProcessMemory(
|
public static Result UnmapProcessMemory(
|
||||||
[PointerSized] ulong dst,
|
[PointerSized] ulong dst,
|
||||||
int handle,
|
int handle,
|
||||||
ulong src,
|
ulong src,
|
||||||
|
@ -1669,7 +1669,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x77)]
|
[Svc(0x77)]
|
||||||
public Result MapProcessCodeMemory(int handle, ulong dst, ulong src, ulong size)
|
public static Result MapProcessCodeMemory(int handle, ulong dst, ulong src, ulong size)
|
||||||
{
|
{
|
||||||
if (!PageAligned(dst) || !PageAligned(src))
|
if (!PageAligned(dst) || !PageAligned(src))
|
||||||
{
|
{
|
||||||
|
@ -1707,7 +1707,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x78)]
|
[Svc(0x78)]
|
||||||
public Result UnmapProcessCodeMemory(int handle, ulong dst, ulong src, ulong size)
|
public static Result UnmapProcessCodeMemory(int handle, ulong dst, ulong src, ulong size)
|
||||||
{
|
{
|
||||||
if (!PageAligned(dst) || !PageAligned(src))
|
if (!PageAligned(dst) || !PageAligned(src))
|
||||||
{
|
{
|
||||||
|
@ -1752,7 +1752,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
// System
|
// System
|
||||||
|
|
||||||
[Svc(0x7b)]
|
[Svc(0x7b)]
|
||||||
public Result TerminateProcess(int handle)
|
public static Result TerminateProcess(int handle)
|
||||||
{
|
{
|
||||||
KProcess process = KernelStatic.GetCurrentProcess();
|
KProcess process = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -1782,7 +1782,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(7)]
|
[Svc(7)]
|
||||||
public void ExitProcess()
|
public static void ExitProcess()
|
||||||
{
|
{
|
||||||
KernelStatic.GetCurrentProcess().TerminateCurrentProcess();
|
KernelStatic.GetCurrentProcess().TerminateCurrentProcess();
|
||||||
}
|
}
|
||||||
|
@ -1878,7 +1878,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x26)]
|
[Svc(0x26)]
|
||||||
public void Break(ulong reason)
|
public static void Break(ulong reason)
|
||||||
{
|
{
|
||||||
KThread currentThread = KernelStatic.GetCurrentThread();
|
KThread currentThread = KernelStatic.GetCurrentThread();
|
||||||
|
|
||||||
|
@ -1905,7 +1905,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x27)]
|
[Svc(0x27)]
|
||||||
public void OutputDebugString([PointerSized] ulong strPtr, [PointerSized] ulong size)
|
public static void OutputDebugString([PointerSized] ulong strPtr, [PointerSized] ulong size)
|
||||||
{
|
{
|
||||||
KProcess process = KernelStatic.GetCurrentProcess();
|
KProcess process = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -2366,7 +2366,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x30)]
|
[Svc(0x30)]
|
||||||
public Result GetResourceLimitLimitValue(out long limitValue, int handle, LimitableResource resource)
|
public static Result GetResourceLimitLimitValue(out long limitValue, int handle, LimitableResource resource)
|
||||||
{
|
{
|
||||||
limitValue = 0;
|
limitValue = 0;
|
||||||
|
|
||||||
|
@ -2388,7 +2388,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x31)]
|
[Svc(0x31)]
|
||||||
public Result GetResourceLimitCurrentValue(out long limitValue, int handle, LimitableResource resource)
|
public static Result GetResourceLimitCurrentValue(out long limitValue, int handle, LimitableResource resource)
|
||||||
{
|
{
|
||||||
limitValue = 0;
|
limitValue = 0;
|
||||||
|
|
||||||
|
@ -2410,7 +2410,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x37)]
|
[Svc(0x37)]
|
||||||
public Result GetResourceLimitPeakValue(out long peak, int handle, LimitableResource resource)
|
public static Result GetResourceLimitPeakValue(out long peak, int handle, LimitableResource resource)
|
||||||
{
|
{
|
||||||
peak = 0;
|
peak = 0;
|
||||||
|
|
||||||
|
@ -2442,7 +2442,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x7e)]
|
[Svc(0x7e)]
|
||||||
public Result SetResourceLimitLimitValue(int handle, LimitableResource resource, long limitValue)
|
public static Result SetResourceLimitLimitValue(int handle, LimitableResource resource, long limitValue)
|
||||||
{
|
{
|
||||||
if (resource >= LimitableResource.Count)
|
if (resource >= LimitableResource.Count)
|
||||||
{
|
{
|
||||||
|
@ -2537,7 +2537,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(9)]
|
[Svc(9)]
|
||||||
public Result StartThread(int handle)
|
public static Result StartThread(int handle)
|
||||||
{
|
{
|
||||||
KProcess process = KernelStatic.GetCurrentProcess();
|
KProcess process = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -2565,7 +2565,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0xa)]
|
[Svc(0xa)]
|
||||||
public void ExitThread()
|
public static void ExitThread()
|
||||||
{
|
{
|
||||||
KThread currentThread = KernelStatic.GetCurrentThread();
|
KThread currentThread = KernelStatic.GetCurrentThread();
|
||||||
|
|
||||||
|
@ -2597,7 +2597,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0xc)]
|
[Svc(0xc)]
|
||||||
public Result GetThreadPriority(out int priority, int handle)
|
public static Result GetThreadPriority(out int priority, int handle)
|
||||||
{
|
{
|
||||||
KProcess process = KernelStatic.GetCurrentProcess();
|
KProcess process = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -2618,7 +2618,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0xd)]
|
[Svc(0xd)]
|
||||||
public Result SetThreadPriority(int handle, int priority)
|
public static Result SetThreadPriority(int handle, int priority)
|
||||||
{
|
{
|
||||||
// TODO: NPDM check.
|
// TODO: NPDM check.
|
||||||
|
|
||||||
|
@ -2637,7 +2637,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0xe)]
|
[Svc(0xe)]
|
||||||
public Result GetThreadCoreMask(out int preferredCore, out ulong affinityMask, int handle)
|
public static Result GetThreadCoreMask(out int preferredCore, out ulong affinityMask, int handle)
|
||||||
{
|
{
|
||||||
KProcess process = KernelStatic.GetCurrentProcess();
|
KProcess process = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -2660,7 +2660,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0xf)]
|
[Svc(0xf)]
|
||||||
public Result SetThreadCoreMask(int handle, int preferredCore, ulong affinityMask)
|
public static Result SetThreadCoreMask(int handle, int preferredCore, ulong affinityMask)
|
||||||
{
|
{
|
||||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -2709,13 +2709,13 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x10)]
|
[Svc(0x10)]
|
||||||
public int GetCurrentProcessorNumber()
|
public static int GetCurrentProcessorNumber()
|
||||||
{
|
{
|
||||||
return KernelStatic.GetCurrentThread().CurrentCore;
|
return KernelStatic.GetCurrentThread().CurrentCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x25)]
|
[Svc(0x25)]
|
||||||
public Result GetThreadId(out ulong threadUid, int handle)
|
public static Result GetThreadId(out ulong threadUid, int handle)
|
||||||
{
|
{
|
||||||
KProcess process = KernelStatic.GetCurrentProcess();
|
KProcess process = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -2736,7 +2736,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x32)]
|
[Svc(0x32)]
|
||||||
public Result SetThreadActivity(int handle, bool pause)
|
public static Result SetThreadActivity(int handle, bool pause)
|
||||||
{
|
{
|
||||||
KProcess process = KernelStatic.GetCurrentProcess();
|
KProcess process = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -2761,7 +2761,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x33)]
|
[Svc(0x33)]
|
||||||
public Result GetThreadContext3([PointerSized] ulong address, int handle)
|
public static Result GetThreadContext3([PointerSized] ulong address, int handle)
|
||||||
{
|
{
|
||||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||||
KThread currentThread = KernelStatic.GetCurrentThread();
|
KThread currentThread = KernelStatic.GetCurrentThread();
|
||||||
|
@ -2926,7 +2926,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x1a)]
|
[Svc(0x1a)]
|
||||||
public Result ArbitrateLock(int ownerHandle, [PointerSized] ulong mutexAddress, int requesterHandle)
|
public static Result ArbitrateLock(int ownerHandle, [PointerSized] ulong mutexAddress, int requesterHandle)
|
||||||
{
|
{
|
||||||
if (IsPointingInsideKernel(mutexAddress))
|
if (IsPointingInsideKernel(mutexAddress))
|
||||||
{
|
{
|
||||||
|
@ -2944,7 +2944,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x1b)]
|
[Svc(0x1b)]
|
||||||
public Result ArbitrateUnlock([PointerSized] ulong mutexAddress)
|
public static Result ArbitrateUnlock([PointerSized] ulong mutexAddress)
|
||||||
{
|
{
|
||||||
if (IsPointingInsideKernel(mutexAddress))
|
if (IsPointingInsideKernel(mutexAddress))
|
||||||
{
|
{
|
||||||
|
@ -2962,7 +2962,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x1c)]
|
[Svc(0x1c)]
|
||||||
public Result WaitProcessWideKeyAtomic(
|
public static Result WaitProcessWideKeyAtomic(
|
||||||
[PointerSized] ulong mutexAddress,
|
[PointerSized] ulong mutexAddress,
|
||||||
[PointerSized] ulong condVarAddress,
|
[PointerSized] ulong condVarAddress,
|
||||||
int handle,
|
int handle,
|
||||||
|
@ -2993,7 +2993,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x1d)]
|
[Svc(0x1d)]
|
||||||
public Result SignalProcessWideKey([PointerSized] ulong address, int count)
|
public static Result SignalProcessWideKey([PointerSized] ulong address, int count)
|
||||||
{
|
{
|
||||||
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
KProcess currentProcess = KernelStatic.GetCurrentProcess();
|
||||||
|
|
||||||
|
@ -3003,7 +3003,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x34)]
|
[Svc(0x34)]
|
||||||
public Result WaitForAddress([PointerSized] ulong address, ArbitrationType type, int value, long timeout)
|
public static Result WaitForAddress([PointerSized] ulong address, ArbitrationType type, int value, long timeout)
|
||||||
{
|
{
|
||||||
if (IsPointingInsideKernel(address))
|
if (IsPointingInsideKernel(address))
|
||||||
{
|
{
|
||||||
|
@ -3035,7 +3035,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x35)]
|
[Svc(0x35)]
|
||||||
public Result SignalToAddress([PointerSized] ulong address, SignalType type, int value, int count)
|
public static Result SignalToAddress([PointerSized] ulong address, SignalType type, int value, int count)
|
||||||
{
|
{
|
||||||
if (IsPointingInsideKernel(address))
|
if (IsPointingInsideKernel(address))
|
||||||
{
|
{
|
||||||
|
@ -3062,7 +3062,7 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
}
|
}
|
||||||
|
|
||||||
[Svc(0x36)]
|
[Svc(0x36)]
|
||||||
public Result SynchronizePreemptionState()
|
public static Result SynchronizePreemptionState()
|
||||||
{
|
{
|
||||||
KernelStatic.GetCurrentThread().SynchronizePreemptionState();
|
KernelStatic.GetCurrentThread().SynchronizePreemptionState();
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ namespace Ryujinx.HLE.HOS.Services.Fatal
|
||||||
|
|
||||||
Logger.Info?.Print(LogClass.ServiceFatal, errorReport.ToString());
|
Logger.Info?.Print(LogClass.ServiceFatal, errorReport.ToString());
|
||||||
|
|
||||||
context.Device.System.KernelContext.Syscall.Break((ulong)resultCode);
|
Kernel.SupervisorCall.Syscall.Break((ulong)resultCode);
|
||||||
|
|
||||||
return ResultCode.Success;
|
return ResultCode.Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ namespace Ryujinx.Horizon.Sdk.Audio.Detail
|
||||||
using MemoryHandle outputHandle = output.Pin();
|
using MemoryHandle outputHandle = output.Pin();
|
||||||
using MemoryHandle performanceOutputHandle = performanceOutput.Pin();
|
using MemoryHandle performanceOutputHandle = performanceOutput.Pin();
|
||||||
|
|
||||||
Result result = new Result((int)_renderSystem.Update(output, performanceOutput, input));
|
Result result = new((int)_renderSystem.Update(output, performanceOutput, input));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ namespace Ryujinx.Horizon.Sdk.Audio.Detail
|
||||||
var clientMemoryManager = HorizonStatic.Syscall.GetMemoryManagerByProcessHandle(processHandle);
|
var clientMemoryManager = HorizonStatic.Syscall.GetMemoryManagerByProcessHandle(processHandle);
|
||||||
ulong workBufferAddress = HorizonStatic.Syscall.GetTransferMemoryAddress(workBufferHandle);
|
ulong workBufferAddress = HorizonStatic.Syscall.GetTransferMemoryAddress(workBufferHandle);
|
||||||
|
|
||||||
Result result = new Result((int)_impl.OpenAudioRenderer(
|
Result result = new((int)_impl.OpenAudioRenderer(
|
||||||
out var renderSystem,
|
out var renderSystem,
|
||||||
clientMemoryManager,
|
clientMemoryManager,
|
||||||
ref parameter.Configuration,
|
ref parameter.Configuration,
|
||||||
|
@ -98,7 +98,7 @@ namespace Ryujinx.Horizon.Sdk.Audio.Detail
|
||||||
{
|
{
|
||||||
var clientMemoryManager = HorizonStatic.Syscall.GetMemoryManagerByProcessHandle(processHandle);
|
var clientMemoryManager = HorizonStatic.Syscall.GetMemoryManagerByProcessHandle(processHandle);
|
||||||
|
|
||||||
Result result = new Result((int)_impl.OpenAudioRenderer(
|
Result result = new((int)_impl.OpenAudioRenderer(
|
||||||
out var renderSystem,
|
out var renderSystem,
|
||||||
clientMemoryManager,
|
clientMemoryManager,
|
||||||
ref parameter.Configuration,
|
ref parameter.Configuration,
|
||||||
|
|
|
@ -230,7 +230,7 @@ namespace Ryujinx.Horizon.Sdk.Codec.Detail
|
||||||
return GetWorkBufferSizeForMultiStreamExImpl(out size, in parameter, fromDsp: true);
|
return GetWorkBufferSizeForMultiStreamExImpl(out size, in parameter, fromDsp: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Result GetWorkBufferSizeExImpl(out int size, in HardwareOpusDecoderParameterInternalEx parameter, bool fromDsp)
|
private static Result GetWorkBufferSizeExImpl(out int size, in HardwareOpusDecoderParameterInternalEx parameter, bool fromDsp)
|
||||||
{
|
{
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ namespace Ryujinx.Horizon.Sdk.Codec.Detail
|
||||||
return Result.Success;
|
return Result.Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Result GetWorkBufferSizeForMultiStreamExImpl(out int size, in HardwareOpusMultiStreamDecoderParameterInternalEx parameter, bool fromDsp)
|
private static Result GetWorkBufferSizeForMultiStreamExImpl(out int size, in HardwareOpusMultiStreamDecoderParameterInternalEx parameter, bool fromDsp)
|
||||||
{
|
{
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace Ryujinx.Input.SDL2
|
||||||
{
|
{
|
||||||
private readonly Dictionary<int, string> _gamepadsInstanceIdsMapping;
|
private readonly Dictionary<int, string> _gamepadsInstanceIdsMapping;
|
||||||
private readonly List<string> _gamepadsIds;
|
private readonly List<string> _gamepadsIds;
|
||||||
private readonly object _lock = new object();
|
private readonly object _lock = new();
|
||||||
|
|
||||||
public ReadOnlySpan<string> GamepadsIds
|
public ReadOnlySpan<string> GamepadsIds
|
||||||
{
|
{
|
||||||
|
|
|
@ -249,7 +249,7 @@ namespace Ryujinx.Memory
|
||||||
=> new NativeMemoryManager<byte>((byte*)pa, size).Memory;
|
=> new NativeMemoryManager<byte>((byte*)pa, size).Memory;
|
||||||
|
|
||||||
protected override unsafe Span<byte> GetPhysicalAddressSpan(nuint pa, int size)
|
protected override unsafe Span<byte> GetPhysicalAddressSpan(nuint pa, int size)
|
||||||
=> new Span<byte>((void*)pa, size);
|
=> new((void*)pa, size);
|
||||||
|
|
||||||
protected override nuint TranslateVirtualAddressChecked(ulong va)
|
protected override nuint TranslateVirtualAddressChecked(ulong va)
|
||||||
=> GetHostAddress(va);
|
=> GetHostAddress(va);
|
||||||
|
|
|
@ -177,7 +177,7 @@ namespace Ryujinx.Memory.Tracking
|
||||||
InitializeRegions();
|
InitializeRegions();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<VirtualRegion> GetGuestRegions(MemoryTracking tracking, ulong address, ulong size, RegionFlags flags)
|
private static List<VirtualRegion> GetGuestRegions(MemoryTracking tracking, ulong address, ulong size, RegionFlags flags)
|
||||||
{
|
{
|
||||||
ulong guestAddress;
|
ulong guestAddress;
|
||||||
ulong guestSize;
|
ulong guestSize;
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace Ryujinx.Tests.Memory
|
||||||
|
|
||||||
IEnumerable<MemoryRange> IVirtualMemoryManager.GetPhysicalRegions(ulong va, ulong size)
|
IEnumerable<MemoryRange> IVirtualMemoryManager.GetPhysicalRegions(ulong va, ulong size)
|
||||||
{
|
{
|
||||||
return NoMappings ? [] : new MemoryRange[] { new MemoryRange(va, size) };
|
return NoMappings ? [] : new MemoryRange[] { new(va, size) };
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsMapped(ulong va)
|
public bool IsMapped(ulong va)
|
||||||
|
|
|
@ -367,12 +367,12 @@ namespace Ryujinx.Ava
|
||||||
}
|
}
|
||||||
|
|
||||||
var colorType = e.IsBgra ? SKColorType.Bgra8888 : SKColorType.Rgba8888;
|
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);
|
Marshal.Copy(e.Data, 0, bitmap.GetPixels(), e.Data.Length);
|
||||||
|
|
||||||
using SKBitmap bitmapToSave = new SKBitmap(bitmap.Width, bitmap.Height);
|
using SKBitmap bitmapToSave = new(bitmap.Width, bitmap.Height);
|
||||||
using SKCanvas canvas = new SKCanvas(bitmapToSave);
|
using SKCanvas canvas = new(bitmapToSave);
|
||||||
|
|
||||||
canvas.Clear(SKColors.Black);
|
canvas.Clear(SKColors.Black);
|
||||||
|
|
||||||
|
@ -396,7 +396,7 @@ namespace Ryujinx.Ava
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveBitmapAsPng(SKBitmap bitmap, string path)
|
private static void SaveBitmapAsPng(SKBitmap bitmap, string path)
|
||||||
{
|
{
|
||||||
using var data = bitmap.Encode(SKEncodedImageFormat.Png, 100);
|
using var data = bitmap.Encode(SKEncodedImageFormat.Png, 100);
|
||||||
using var stream = File.OpenWrite(path);
|
using var stream = File.OpenWrite(path);
|
||||||
|
|
Loading…
Reference in a new issue