aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.HLE')
-rw-r--r--src/Ryujinx.HLE/FileSystem/VirtualFileSystem.cs8
-rw-r--r--src/Ryujinx.HLE/HOS/Horizon.cs6
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs18
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Mii/Helper.cs4
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Sdb/Pl/SharedFontManager.cs6
-rw-r--r--src/Ryujinx.HLE/HOS/Services/ServerBase.cs4
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs36
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs10
-rw-r--r--src/Ryujinx.HLE/HOS/Tamper/InstructionHelper.cs10
9 files changed, 51 insertions, 51 deletions
diff --git a/src/Ryujinx.HLE/FileSystem/VirtualFileSystem.cs b/src/Ryujinx.HLE/FileSystem/VirtualFileSystem.cs
index 1b3968ea..e21c2814 100644
--- a/src/Ryujinx.HLE/FileSystem/VirtualFileSystem.cs
+++ b/src/Ryujinx.HLE/FileSystem/VirtualFileSystem.cs
@@ -354,8 +354,8 @@ namespace Ryujinx.HLE.FileSystem
if (info.SpaceId != SaveDataSpaceId.User && info.SpaceId != SaveDataSpaceId.System)
return Result.Success;
- const string mountName = "SaveDir";
- var mountNameU8 = mountName.ToU8Span();
+ const string MountName = "SaveDir";
+ var mountNameU8 = MountName.ToU8Span();
BisPartitionId partitionId = info.SpaceId switch
{
@@ -368,7 +368,7 @@ namespace Ryujinx.HLE.FileSystem
if (rc.IsFailure()) return rc;
try
{
- var path = $"{mountName}:/save/{info.SaveDataId:x16}".ToU8Span();
+ var path = $"{MountName}:/save/{info.SaveDataId:x16}".ToU8Span();
rc = hos.Fs.GetEntryType(out _, path);
@@ -612,4 +612,4 @@ namespace Ryujinx.HLE.FileSystem
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Horizon.cs b/src/Ryujinx.HLE/HOS/Horizon.cs
index 166761c2..2f163fa2 100644
--- a/src/Ryujinx.HLE/HOS/Horizon.cs
+++ b/src/Ryujinx.HLE/HOS/Horizon.cs
@@ -332,13 +332,13 @@ namespace Ryujinx.HLE.HOS
foreach (var service in services)
{
- const ProcessCreationFlags flags =
+ const ProcessCreationFlags Flags =
ProcessCreationFlags.EnableAslr |
ProcessCreationFlags.AddressSpace64Bit |
ProcessCreationFlags.Is64Bit |
ProcessCreationFlags.PoolPartitionSystem;
- ProcessCreationInfo creationInfo = new ProcessCreationInfo("Service", 1, 0, 0x8000000, 1, flags, 0, 0);
+ ProcessCreationInfo creationInfo = new ProcessCreationInfo("Service", 1, 0, 0x8000000, 1, Flags, 0, 0);
uint[] defaultCapabilities = new uint[]
{
@@ -554,4 +554,4 @@ namespace Ryujinx.HLE.HOS
IsPaused = pause;
}
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs b/src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs
index b1466c78..e4755f78 100644
--- a/src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs
@@ -83,18 +83,18 @@ namespace Ryujinx.HLE.HOS.Services.Hid
public ControllerKeys UpdateStickButtons(JoystickPosition leftStick, JoystickPosition rightStick)
{
- const int stickButtonThreshold = short.MaxValue / 2;
+ const int StickButtonThreshold = short.MaxValue / 2;
ControllerKeys result = 0;
- result |= (leftStick.Dx < -stickButtonThreshold) ? ControllerKeys.LStickLeft : result;
- result |= (leftStick.Dx > stickButtonThreshold) ? ControllerKeys.LStickRight : result;
- result |= (leftStick.Dy < -stickButtonThreshold) ? ControllerKeys.LStickDown : result;
- result |= (leftStick.Dy > stickButtonThreshold) ? ControllerKeys.LStickUp : result;
+ result |= (leftStick.Dx < -StickButtonThreshold) ? ControllerKeys.LStickLeft : result;
+ result |= (leftStick.Dx > StickButtonThreshold) ? ControllerKeys.LStickRight : result;
+ result |= (leftStick.Dy < -StickButtonThreshold) ? ControllerKeys.LStickDown : result;
+ result |= (leftStick.Dy > StickButtonThreshold) ? ControllerKeys.LStickUp : result;
- result |= (rightStick.Dx < -stickButtonThreshold) ? ControllerKeys.RStickLeft : result;
- result |= (rightStick.Dx > stickButtonThreshold) ? ControllerKeys.RStickRight : result;
- result |= (rightStick.Dy < -stickButtonThreshold) ? ControllerKeys.RStickDown : result;
- result |= (rightStick.Dy > stickButtonThreshold) ? ControllerKeys.RStickUp : result;
+ result |= (rightStick.Dx < -StickButtonThreshold) ? ControllerKeys.RStickLeft : result;
+ result |= (rightStick.Dx > StickButtonThreshold) ? ControllerKeys.RStickRight : result;
+ result |= (rightStick.Dy < -StickButtonThreshold) ? ControllerKeys.RStickDown : result;
+ result |= (rightStick.Dy > StickButtonThreshold) ? ControllerKeys.RStickUp : result;
return result;
}
diff --git a/src/Ryujinx.HLE/HOS/Services/Mii/Helper.cs b/src/Ryujinx.HLE/HOS/Services/Mii/Helper.cs
index b02bbfd1..b8dbce15 100644
--- a/src/Ryujinx.HLE/HOS/Services/Mii/Helper.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Mii/Helper.cs
@@ -8,7 +8,7 @@ namespace Ryujinx.HLE.HOS.Services.Mii
{
public static ushort CalculateCrc16(ReadOnlySpan<byte> data, int crc, bool reverseEndianess)
{
- const ushort poly = 0x1021;
+ const ushort Poly = 0x1021;
for (int i = 0; i < data.Length; i++)
{
@@ -20,7 +20,7 @@ namespace Ryujinx.HLE.HOS.Services.Mii
if ((crc & 0x10000) != 0)
{
- crc = (crc ^ poly) & 0xFFFF;
+ crc = (crc ^ Poly) & 0xFFFF;
}
}
}
diff --git a/src/Ryujinx.HLE/HOS/Services/Sdb/Pl/SharedFontManager.cs b/src/Ryujinx.HLE/HOS/Services/Sdb/Pl/SharedFontManager.cs
index fef82cbc..c0556c31 100644
--- a/src/Ryujinx.HLE/HOS/Services/Sdb/Pl/SharedFontManager.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Sdb/Pl/SharedFontManager.cs
@@ -134,9 +134,9 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pl
private void WriteMagicAndSize(ulong offset, int size)
{
- const int key = 0x49621806;
+ const int Key = 0x49621806;
- int encryptedSize = BinaryPrimitives.ReverseEndianness(size ^ key);
+ int encryptedSize = BinaryPrimitives.ReverseEndianness(size ^ Key);
_storage.GetRef<int>(offset + 0) = (int)BFTTFMagic;
_storage.GetRef<int>(offset + 4) = encryptedSize;
@@ -180,4 +180,4 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pl
}
}
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/ServerBase.cs b/src/Ryujinx.HLE/HOS/Services/ServerBase.cs
index ff6df8a3..f8ce465f 100644
--- a/src/Ryujinx.HLE/HOS/Services/ServerBase.cs
+++ b/src/Ryujinx.HLE/HOS/Services/ServerBase.cs
@@ -70,13 +70,13 @@ namespace Ryujinx.HLE.HOS.Services
Name = name;
SmObjectFactory = smObjectFactory;
- const ProcessCreationFlags flags =
+ const ProcessCreationFlags Flags =
ProcessCreationFlags.EnableAslr |
ProcessCreationFlags.AddressSpace64Bit |
ProcessCreationFlags.Is64Bit |
ProcessCreationFlags.PoolPartitionSystem;
- ProcessCreationInfo creationInfo = new ProcessCreationInfo("Service", 1, 0, 0x8000000, 1, flags, 0, 0);
+ ProcessCreationInfo creationInfo = new ProcessCreationInfo("Service", 1, 0, 0x8000000, 1, Flags, 0, 0);
KernelStatic.StartInitialProcess(context, creationInfo, DefaultCapabilities, 44, Main);
}
diff --git a/src/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs b/src/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs
index ef95fa5c..07c9f6b3 100644
--- a/src/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs
@@ -43,43 +43,43 @@ namespace Ryujinx.HLE.HOS.Services.Settings
return ResultCode.Success;
}
- const byte majorFwVersion = 0x03;
- const byte minorFwVersion = 0x00;
- const byte microFwVersion = 0x00;
- const byte unknown = 0x00; //Build?
+ const byte MajorFwVersion = 0x03;
+ const byte MinorFwVersion = 0x00;
+ const byte MicroFwVersion = 0x00;
+ const byte Unknown = 0x00; //Build?
- const int revisionNumber = 0x0A;
+ const int RevisionNumber = 0x0A;
- const string platform = "NX";
- const string unknownHex = "7fbde2b0bba4d14107bf836e4643043d9f6c8e47";
- const string version = "3.0.0";
- const string build = "NintendoSDK Firmware for NX 3.0.0-10.0";
+ const string Platform = "NX";
+ const string UnknownHex = "7fbde2b0bba4d14107bf836e4643043d9f6c8e47";
+ const string Version = "3.0.0";
+ const string Build = "NintendoSDK Firmware for NX 3.0.0-10.0";
// http://switchbrew.org/index.php?title=System_Version_Title
using (MemoryStream ms = new MemoryStream(0x100))
{
BinaryWriter writer = new BinaryWriter(ms);
- writer.Write(majorFwVersion);
- writer.Write(minorFwVersion);
- writer.Write(microFwVersion);
- writer.Write(unknown);
+ writer.Write(MajorFwVersion);
+ writer.Write(MinorFwVersion);
+ writer.Write(MicroFwVersion);
+ writer.Write(Unknown);
- writer.Write(revisionNumber);
+ writer.Write(RevisionNumber);
- writer.Write(Encoding.ASCII.GetBytes(platform));
+ writer.Write(Encoding.ASCII.GetBytes(Platform));
ms.Seek(0x28, SeekOrigin.Begin);
- writer.Write(Encoding.ASCII.GetBytes(unknownHex));
+ writer.Write(Encoding.ASCII.GetBytes(UnknownHex));
ms.Seek(0x68, SeekOrigin.Begin);
- writer.Write(Encoding.ASCII.GetBytes(version));
+ writer.Write(Encoding.ASCII.GetBytes(Version));
ms.Seek(0x80, SeekOrigin.Begin);
- writer.Write(Encoding.ASCII.GetBytes(build));
+ writer.Write(Encoding.ASCII.GetBytes(Build));
context.Memory.Write(replyPos, ms.ToArray());
}
diff --git a/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs b/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs
index 52ed5222..89eed5b5 100644
--- a/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Vi/RootService/IApplicationDisplayService.cs
@@ -354,16 +354,16 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService
private ulong GetA8B8G8R8LayerSize(int width, int height, out int pitch, out int alignment)
{
- const int defaultAlignment = 0x1000;
- const ulong defaultSize = 0x20000;
+ const int DefaultAlignment = 0x1000;
+ const ulong DefaultSize = 0x20000;
- alignment = defaultAlignment;
+ alignment = DefaultAlignment;
pitch = BitUtils.AlignUp(BitUtils.DivRoundUp(width * 32, 8), 64);
int memorySize = pitch * BitUtils.AlignUp(height, 64);
ulong requiredMemorySize = (ulong)BitUtils.AlignUp(memorySize, alignment);
- return (requiredMemorySize + defaultSize - 1) / defaultSize * defaultSize;
+ return (requiredMemorySize + DefaultSize - 1) / DefaultSize * DefaultSize;
}
[CommandCmif(2450)]
@@ -484,4 +484,4 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService
return ResultCode.Success;
}
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Tamper/InstructionHelper.cs b/src/Ryujinx.HLE/HOS/Tamper/InstructionHelper.cs
index e85d99c7..a31c055f 100644
--- a/src/Ryujinx.HLE/HOS/Tamper/InstructionHelper.cs
+++ b/src/Ryujinx.HLE/HOS/Tamper/InstructionHelper.cs
@@ -96,14 +96,14 @@ namespace Ryujinx.HLE.HOS.Tamper
public static byte[] ParseRawInstruction(string rawInstruction)
{
- const int wordSize = 2 * sizeof(uint);
+ const int WordSize = 2 * sizeof(uint);
// Instructions are multi-word, with 32bit words. Split the raw instruction
// and parse each word into individual nybbles of bits.
var words = rawInstruction.Split((char[])null, StringSplitOptions.RemoveEmptyEntries);
- byte[] instruction = new byte[wordSize * words.Length];
+ byte[] instruction = new byte[WordSize * words.Length];
if (words.Length == 0)
{
@@ -114,14 +114,14 @@ namespace Ryujinx.HLE.HOS.Tamper
{
string word = words[wordIndex];
- if (word.Length != wordSize)
+ if (word.Length != WordSize)
{
throw new TamperCompilationException($"Invalid word length for {word} in Atmosphere cheat");
}
- for (int nybbleIndex = 0; nybbleIndex < wordSize; nybbleIndex++)
+ for (int nybbleIndex = 0; nybbleIndex < WordSize; nybbleIndex++)
{
- int index = wordIndex * wordSize + nybbleIndex;
+ int index = wordIndex * WordSize + nybbleIndex;
instruction[index] = byte.Parse(word.AsSpan(nybbleIndex, 1), NumberStyles.HexNumber, CultureInfo.InvariantCulture);
}