aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2018-12-04 14:23:37 -0600
committergdkchan <gab.dark.100@gmail.com>2018-12-04 18:23:37 -0200
commit85dbb9559ad317a657dafd24da27fec4b3f5250f (patch)
treeecd92931bc2146e549484d9a3af308469089ad4e /Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs
parentc86aacde76b5f8e503e2b412385c8491ecc86b3b (diff)
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
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs b/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs
index 0c26b7d9..2bfafd95 100644
--- a/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs
+++ b/Ryujinx.HLE/HOS/Services/Sm/IUserInterface.cs
@@ -7,15 +7,15 @@ namespace Ryujinx.HLE.HOS.Services.Sm
{
class IUserInterface : IpcService
{
- private Dictionary<int, ServiceProcessRequest> m_Commands;
+ private Dictionary<int, ServiceProcessRequest> _commands;
- public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
- private bool IsInitialized;
+ private bool _isInitialized;
public IUserInterface()
{
- m_Commands = new Dictionary<int, ServiceProcessRequest>()
+ _commands = new Dictionary<int, ServiceProcessRequest>
{
{ 0, Initialize },
{ 1, GetService }
@@ -24,48 +24,48 @@ namespace Ryujinx.HLE.HOS.Services.Sm
private const int SmNotInitialized = 0x415;
- public long Initialize(ServiceCtx Context)
+ public long Initialize(ServiceCtx context)
{
- IsInitialized = true;
+ _isInitialized = true;
return 0;
}
- public long GetService(ServiceCtx Context)
+ public long GetService(ServiceCtx context)
{
//Only for kernel version > 3.0.0.
- if (!IsInitialized)
+ if (!_isInitialized)
{
//return SmNotInitialized;
}
- string Name = string.Empty;
+ string name = string.Empty;
- for (int Index = 0; Index < 8 &&
- Context.RequestData.BaseStream.Position <
- Context.RequestData.BaseStream.Length; Index++)
+ for (int index = 0; index < 8 &&
+ context.RequestData.BaseStream.Position <
+ context.RequestData.BaseStream.Length; index++)
{
- byte Chr = Context.RequestData.ReadByte();
+ byte chr = context.RequestData.ReadByte();
- if (Chr >= 0x20 && Chr < 0x7f)
+ if (chr >= 0x20 && chr < 0x7f)
{
- Name += (char)Chr;
+ name += (char)chr;
}
}
- if (Name == string.Empty)
+ if (name == string.Empty)
{
return 0;
}
- KSession Session = new KSession(ServiceFactory.MakeService(Context.Device.System, Name), Name);
+ KSession session = new KSession(ServiceFactory.MakeService(context.Device.System, name), name);
- if (Context.Process.HandleTable.GenerateHandle(Session, out int Handle) != KernelResult.Success)
+ if (context.Process.HandleTable.GenerateHandle(session, out int handle) != KernelResult.Success)
{
throw new InvalidOperationException("Out of handles!");
}
- Context.Response.HandleDesc = IpcHandleDesc.MakeMove(Handle);
+ context.Response.HandleDesc = IpcHandleDesc.MakeMove(handle);
return 0;
}