aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Homebrew.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2018-12-06 05:16:24 -0600
committergdkchan <gab.dark.100@gmail.com>2018-12-06 09:16:24 -0200
commitfb1d9493a3d43f2b86c551682586905a1f0e9ea7 (patch)
treed842685ff5bdd45d11d94bd1a45a002b9d532fe7 /Ryujinx.HLE/HOS/Homebrew.cs
parent3615a70cae3f89197fe185dfc5d0a47fa42151d9 (diff)
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 ad5eb5787cc5b27a4631cd46ef5f551c4ae95e51. * Small changes * Revert external enum renaming * Changes from feedback * Apply previous refactorings to the merged code
Diffstat (limited to 'Ryujinx.HLE/HOS/Homebrew.cs')
-rw-r--r--Ryujinx.HLE/HOS/Homebrew.cs58
1 files changed, 29 insertions, 29 deletions
diff --git a/Ryujinx.HLE/HOS/Homebrew.cs b/Ryujinx.HLE/HOS/Homebrew.cs
index ffb22c7f..b0e05554 100644
--- a/Ryujinx.HLE/HOS/Homebrew.cs
+++ b/Ryujinx.HLE/HOS/Homebrew.cs
@@ -8,70 +8,70 @@ namespace Ryujinx.HLE.HOS
public const string TemporaryNroSuffix = ".ryu_tmp.nro";
//http://switchbrew.org/index.php?title=Homebrew_ABI
- public static void WriteHbAbiData(MemoryManager Memory, long Position, int MainThreadHandle, string SwitchPath)
+ public static void WriteHbAbiData(MemoryManager memory, long position, int mainThreadHandle, string switchPath)
{
//MainThreadHandle.
- WriteConfigEntry(Memory, ref Position, 1, 0, MainThreadHandle);
+ WriteConfigEntry(memory, ref position, 1, 0, mainThreadHandle);
//NextLoadPath.
- WriteConfigEntry(Memory, ref Position, 2, 0, Position + 0x200, Position + 0x400);
+ WriteConfigEntry(memory, ref position, 2, 0, position + 0x200, position + 0x400);
//Argv.
- long ArgvPosition = Position + 0xC00;
+ long argvPosition = position + 0xC00;
- Memory.WriteBytes(ArgvPosition, Encoding.ASCII.GetBytes(SwitchPath + "\0"));
+ memory.WriteBytes(argvPosition, Encoding.ASCII.GetBytes(switchPath + "\0"));
- WriteConfigEntry(Memory, ref Position, 5, 0, 0, ArgvPosition);
+ WriteConfigEntry(memory, ref position, 5, 0, 0, argvPosition);
//AppletType.
- WriteConfigEntry(Memory, ref Position, 7);
+ WriteConfigEntry(memory, ref position, 7);
//EndOfList.
- WriteConfigEntry(Memory, ref Position, 0);
+ WriteConfigEntry(memory, ref position, 0);
}
private static void WriteConfigEntry(
- MemoryManager Memory,
- ref long Position,
- int Key,
- int Flags = 0,
- long Value0 = 0,
- long Value1 = 0)
+ MemoryManager memory,
+ ref long position,
+ int key,
+ int flags = 0,
+ long value0 = 0,
+ long value1 = 0)
{
- Memory.WriteInt32(Position + 0x00, Key);
- Memory.WriteInt32(Position + 0x04, Flags);
- Memory.WriteInt64(Position + 0x08, Value0);
- Memory.WriteInt64(Position + 0x10, Value1);
+ memory.WriteInt32(position + 0x00, key);
+ memory.WriteInt32(position + 0x04, flags);
+ memory.WriteInt64(position + 0x08, value0);
+ memory.WriteInt64(position + 0x10, value1);
- Position += 0x18;
+ position += 0x18;
}
- public static string ReadHbAbiNextLoadPath(MemoryManager Memory, long Position)
+ public static string ReadHbAbiNextLoadPath(MemoryManager memory, long position)
{
- string FileName = null;
+ string fileName = null;
while (true)
{
- long Key = Memory.ReadInt64(Position);
+ long key = memory.ReadInt64(position);
- if (Key == 2)
+ if (key == 2)
{
- long Value0 = Memory.ReadInt64(Position + 0x08);
- long Value1 = Memory.ReadInt64(Position + 0x10);
+ long value0 = memory.ReadInt64(position + 0x08);
+ long value1 = memory.ReadInt64(position + 0x10);
- FileName = MemoryHelper.ReadAsciiString(Memory, Value0, Value1 - Value0);
+ fileName = MemoryHelper.ReadAsciiString(memory, value0, value1 - value0);
break;
}
- else if (Key == 0)
+ else if (key == 0)
{
break;
}
- Position += 0x18;
+ position += 0x18;
}
- return FileName;
+ return fileName;
}
}
}