Adjust naming conventions and general refactoring in HLE Project (#490)
* Rename enum fields * Naming conventions * Remove unneeded ".this" * Remove unneeded semicolons * Remove unused Usings * Don't use var * Remove unneeded enum underlying types * Explicitly label class visibility * Remove unneeded @ prefixes * Remove unneeded commas * Remove unneeded if expressions * Method doesn't use unsafe code * Remove unneeded casts * Initialized objects don't need an empty constructor * Remove settings from DotSettings * Revert "Explicitly label class visibility" This reverts commit ad5eb5787cc5b27a4631cd46ef5f551c4ae95e51. * Small changes * Revert external enum renaming * Changes from feedback * Remove unneeded property setters
This commit is contained in:
parent
c86aacde76
commit
85dbb9559a
299 changed files with 12268 additions and 12276 deletions
|
@ -10,38 +10,38 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
{
|
||||
partial class SvcHandler
|
||||
{
|
||||
private delegate void SvcFunc(CpuThreadState ThreadState);
|
||||
private delegate void SvcFunc(CpuThreadState threadState);
|
||||
|
||||
private Dictionary<int, SvcFunc> SvcFuncs;
|
||||
private Dictionary<int, SvcFunc> _svcFuncs;
|
||||
|
||||
private Switch Device;
|
||||
private KProcess Process;
|
||||
private Horizon System;
|
||||
private MemoryManager Memory;
|
||||
private Switch _device;
|
||||
private KProcess _process;
|
||||
private Horizon _system;
|
||||
private MemoryManager _memory;
|
||||
|
||||
private struct HleIpcMessage
|
||||
{
|
||||
public KThread Thread { get; private set; }
|
||||
public KSession Session { get; private set; }
|
||||
public IpcMessage Message { get; private set; }
|
||||
public long MessagePtr { get; private set; }
|
||||
public KThread Thread { get; }
|
||||
public KSession Session { get; }
|
||||
public IpcMessage Message { get; }
|
||||
public long MessagePtr { get; }
|
||||
|
||||
public HleIpcMessage(
|
||||
KThread Thread,
|
||||
KSession Session,
|
||||
IpcMessage Message,
|
||||
long MessagePtr)
|
||||
KThread thread,
|
||||
KSession session,
|
||||
IpcMessage message,
|
||||
long messagePtr)
|
||||
{
|
||||
this.Thread = Thread;
|
||||
this.Session = Session;
|
||||
this.Message = Message;
|
||||
this.MessagePtr = MessagePtr;
|
||||
Thread = thread;
|
||||
Session = session;
|
||||
Message = message;
|
||||
MessagePtr = messagePtr;
|
||||
}
|
||||
}
|
||||
|
||||
public SvcHandler(Switch Device, KProcess Process)
|
||||
public SvcHandler(Switch device, KProcess process)
|
||||
{
|
||||
SvcFuncs = new Dictionary<int, SvcFunc>()
|
||||
_svcFuncs = new Dictionary<int, SvcFunc>
|
||||
{
|
||||
{ 0x01, SvcSetHeapSize },
|
||||
{ 0x03, SvcSetMemoryAttribute },
|
||||
|
@ -93,23 +93,23 @@ namespace Ryujinx.HLE.HOS.Kernel
|
|||
{ 0x71, ManageNamedPort64 }
|
||||
};
|
||||
|
||||
this.Device = Device;
|
||||
this.Process = Process;
|
||||
this.System = Device.System;
|
||||
this.Memory = Process.CpuMemory;
|
||||
_device = device;
|
||||
_process = process;
|
||||
_system = device.System;
|
||||
_memory = process.CpuMemory;
|
||||
}
|
||||
|
||||
public void SvcCall(object sender, InstExceptionEventArgs e)
|
||||
{
|
||||
CpuThreadState ThreadState = (CpuThreadState)sender;
|
||||
CpuThreadState threadState = (CpuThreadState)sender;
|
||||
|
||||
if (SvcFuncs.TryGetValue(e.Id, out SvcFunc Func))
|
||||
if (_svcFuncs.TryGetValue(e.Id, out SvcFunc func))
|
||||
{
|
||||
Logger.PrintDebug(LogClass.KernelSvc, $"{Func.Method.Name} called.");
|
||||
Logger.PrintDebug(LogClass.KernelSvc, $"{func.Method.Name} called.");
|
||||
|
||||
Func(ThreadState);
|
||||
func(threadState);
|
||||
|
||||
Logger.PrintDebug(LogClass.KernelSvc, $"{Func.Method.Name} ended.");
|
||||
Logger.PrintDebug(LogClass.KernelSvc, $"{func.Method.Name} ended.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue