diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Homebrew.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Homebrew.cs | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/Ryujinx.HLE/HOS/Homebrew.cs b/Ryujinx.HLE/HOS/Homebrew.cs index b0e05554..ffb22c7f 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; } } } |