mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-22 15:27:10 +02:00
Apply new naming rule to all projects except Vp9 (#5407)
This commit is contained in:
parent
b186ec9fc5
commit
fbaf62c230
42 changed files with 334 additions and 335 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue