diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2018-12-04 22:52:39 -0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-04 22:52:39 -0200 |
| commit | 3615a70cae3f89197fe185dfc5d0a47fa42151d9 (patch) | |
| tree | 8e4737422fba15199c1a6ce7c6345996c0e907b5 /Ryujinx.HLE/HOS/Services/Nfp | |
| parent | 85dbb9559ad317a657dafd24da27fec4b3f5250f (diff) | |
Revert "Adjust naming conventions and general refactoring in HLE Project (#490)" (#526)
This reverts commit 85dbb9559ad317a657dafd24da27fec4b3f5250f.
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Nfp')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Nfp/IUser.cs | 60 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Nfp/IUserManager.cs | 10 |
2 files changed, 35 insertions, 35 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nfp/IUser.cs b/Ryujinx.HLE/HOS/Services/Nfp/IUser.cs index 9e19e77f..f0dc825b 100644 --- a/Ryujinx.HLE/HOS/Services/Nfp/IUser.cs +++ b/Ryujinx.HLE/HOS/Services/Nfp/IUser.cs @@ -9,25 +9,25 @@ namespace Ryujinx.HLE.HOS.Services.Nfp { class IUser : IpcService { - private Dictionary<int, ServiceProcessRequest> _commands; + private Dictionary<int, ServiceProcessRequest> m_Commands; - public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands; + public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; - private const HidControllerId NpadId = HidControllerId.ControllerPlayer1; + private const HidControllerId NpadId = HidControllerId.CONTROLLER_PLAYER_1; - private State _state = State.NonInitialized; + private State State = State.NonInitialized; - private DeviceState _deviceState = DeviceState.Initialized; + private DeviceState DeviceState = DeviceState.Initialized; - private KEvent _activateEvent; + private KEvent ActivateEvent; - private KEvent _deactivateEvent; + private KEvent DeactivateEvent; - private KEvent _availabilityChangeEvent; + private KEvent AvailabilityChangeEvent; - public IUser(Horizon system) + public IUser(Horizon System) { - _commands = new Dictionary<int, ServiceProcessRequest> + m_Commands = new Dictionary<int, ServiceProcessRequest>() { { 0, Initialize }, { 17, AttachActivateEvent }, @@ -38,85 +38,85 @@ namespace Ryujinx.HLE.HOS.Services.Nfp { 23, AttachAvailabilityChangeEvent } }; - _activateEvent = new KEvent(system); - _deactivateEvent = new KEvent(system); - _availabilityChangeEvent = new KEvent(system); + ActivateEvent = new KEvent(System); + DeactivateEvent = new KEvent(System); + AvailabilityChangeEvent = new KEvent(System); } - public long Initialize(ServiceCtx context) + public long Initialize(ServiceCtx Context) { Logger.PrintStub(LogClass.ServiceNfp, "Stubbed."); - _state = State.Initialized; + State = State.Initialized; return 0; } - public long AttachActivateEvent(ServiceCtx context) + public long AttachActivateEvent(ServiceCtx Context) { Logger.PrintStub(LogClass.ServiceNfp, "Stubbed."); - if (context.Process.HandleTable.GenerateHandle(_activateEvent.ReadableEvent, out int handle) != KernelResult.Success) + if (Context.Process.HandleTable.GenerateHandle(ActivateEvent.ReadableEvent, out int Handle) != KernelResult.Success) { throw new InvalidOperationException("Out of handles!"); } - context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle); + Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);; return 0; } - public long AttachDeactivateEvent(ServiceCtx context) + public long AttachDeactivateEvent(ServiceCtx Context) { Logger.PrintStub(LogClass.ServiceNfp, "Stubbed."); - if (context.Process.HandleTable.GenerateHandle(_deactivateEvent.ReadableEvent, out int handle) != KernelResult.Success) + if (Context.Process.HandleTable.GenerateHandle(DeactivateEvent.ReadableEvent, out int Handle) != KernelResult.Success) { throw new InvalidOperationException("Out of handles!"); } - context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle); + Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle); return 0; } - public long GetState(ServiceCtx context) + public long GetState(ServiceCtx Context) { - context.ResponseData.Write((int)_state); + Context.ResponseData.Write((int)State); Logger.PrintStub(LogClass.ServiceNfp, "Stubbed."); return 0; } - public long GetDeviceState(ServiceCtx context) + public long GetDeviceState(ServiceCtx Context) { - context.ResponseData.Write((int)_deviceState); + Context.ResponseData.Write((int)DeviceState); Logger.PrintStub(LogClass.ServiceNfp, "Stubbed."); return 0; } - public long GetNpadId(ServiceCtx context) + public long GetNpadId(ServiceCtx Context) { - context.ResponseData.Write((int)NpadId); + Context.ResponseData.Write((int)NpadId); Logger.PrintStub(LogClass.ServiceNfp, "Stubbed."); return 0; } - public long AttachAvailabilityChangeEvent(ServiceCtx context) + public long AttachAvailabilityChangeEvent(ServiceCtx Context) { Logger.PrintStub(LogClass.ServiceNfp, "Stubbed."); - if (context.Process.HandleTable.GenerateHandle(_availabilityChangeEvent.ReadableEvent, out int handle) != KernelResult.Success) + if (Context.Process.HandleTable.GenerateHandle(AvailabilityChangeEvent.ReadableEvent, out int Handle) != KernelResult.Success) { throw new InvalidOperationException("Out of handles!"); } - context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle); + Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle); return 0; } diff --git a/Ryujinx.HLE/HOS/Services/Nfp/IUserManager.cs b/Ryujinx.HLE/HOS/Services/Nfp/IUserManager.cs index 1bf93746..e5d5a4f1 100644 --- a/Ryujinx.HLE/HOS/Services/Nfp/IUserManager.cs +++ b/Ryujinx.HLE/HOS/Services/Nfp/IUserManager.cs @@ -5,21 +5,21 @@ namespace Ryujinx.HLE.HOS.Services.Nfp { class IUserManager : IpcService { - private Dictionary<int, ServiceProcessRequest> _commands; + private Dictionary<int, ServiceProcessRequest> m_Commands; - public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands; + public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands; public IUserManager() { - _commands = new Dictionary<int, ServiceProcessRequest> + m_Commands = new Dictionary<int, ServiceProcessRequest>() { { 0, GetUserInterface } }; } - public long GetUserInterface(ServiceCtx context) + public long GetUserInterface(ServiceCtx Context) { - MakeObject(context, new IUser(context.Device.System)); + MakeObject(Context, new IUser(Context.Device.System)); return 0; } |
