Adjust naming conventions and general refactoring in HLE Project (#527)
* 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 ad5eb5787c
.
* Small changes
* Revert external enum renaming
* Changes from feedback
* Apply previous refactorings to the merged code
This commit is contained in:
parent
3615a70cae
commit
fb1d9493a3
298 changed files with 12034 additions and 12037 deletions
|
@ -6,20 +6,20 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
|||
{
|
||||
class IPsmServer : IpcService
|
||||
{
|
||||
enum ChargerType : int
|
||||
enum ChargerType
|
||||
{
|
||||
None,
|
||||
ChargerOrDock,
|
||||
UsbC
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
public IPsmServer()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
_commands = new Dictionary<int, ServiceProcessRequest>
|
||||
{
|
||||
{ 0, GetBatteryChargePercentage },
|
||||
{ 1, GetChargerType },
|
||||
|
@ -28,21 +28,21 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
|||
}
|
||||
|
||||
// GetBatteryChargePercentage() -> u32
|
||||
public static long GetBatteryChargePercentage(ServiceCtx Context)
|
||||
public static long GetBatteryChargePercentage(ServiceCtx context)
|
||||
{
|
||||
int ChargePercentage = 100;
|
||||
int chargePercentage = 100;
|
||||
|
||||
Context.ResponseData.Write(ChargePercentage);
|
||||
context.ResponseData.Write(chargePercentage);
|
||||
|
||||
Logger.PrintStub(LogClass.ServicePsm, $"Stubbed. ChargePercentage: {ChargePercentage}");
|
||||
Logger.PrintStub(LogClass.ServicePsm, $"Stubbed. ChargePercentage: {chargePercentage}");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// GetChargerType() -> u32
|
||||
public static long GetChargerType(ServiceCtx Context)
|
||||
public static long GetChargerType(ServiceCtx context)
|
||||
{
|
||||
Context.ResponseData.Write((int)ChargerType.ChargerOrDock);
|
||||
context.ResponseData.Write((int)ChargerType.ChargerOrDock);
|
||||
|
||||
Logger.PrintStub(LogClass.ServicePsm, $"Stubbed. ChargerType: {ChargerType.ChargerOrDock}");
|
||||
|
||||
|
@ -50,9 +50,9 @@ namespace Ryujinx.HLE.HOS.Services.Psm
|
|||
}
|
||||
|
||||
// OpenSession() -> IPsmSession
|
||||
public long OpenSession(ServiceCtx Context)
|
||||
public long OpenSession(ServiceCtx context)
|
||||
{
|
||||
MakeObject(Context, new IPsmSession(Context.Device.System));
|
||||
MakeObject(context, new IPsmSession(context.Device.System));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue