diff options
author | Ac_K <Acoustik666@gmail.com> | 2022-03-22 20:46:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 20:46:16 +0100 |
commit | e3b36db71c62a34a26b30683dd5ad5410c97cc9c (patch) | |
tree | 18feea12db46ad2ddcdc207e9fd0e805fd98b7da /Ryujinx.HLE/FileSystem/SystemVersion.cs | |
parent | ba0171d05464201c1513386b7d0b69b5ea956426 (diff) |
hle: Some cleanup (#3210)1.1.83
* hle: Some cleanup
This PR cleaned up a bit the HLE folder and the VirtualFileSystem one, since we use LibHac, we can use some class of it directly instead of duplicate things. The "Content" of VFS folder is removed since it should be handled in the NCM service directly.
A larger cleanup should be done later since there is still be duplicated code here and there.
* Fix Headless.SDL2
* Addresses gdkchan feedback
Diffstat (limited to 'Ryujinx.HLE/FileSystem/SystemVersion.cs')
-rw-r--r-- | Ryujinx.HLE/FileSystem/SystemVersion.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Ryujinx.HLE/FileSystem/SystemVersion.cs b/Ryujinx.HLE/FileSystem/SystemVersion.cs new file mode 100644 index 00000000..a7926d5d --- /dev/null +++ b/Ryujinx.HLE/FileSystem/SystemVersion.cs @@ -0,0 +1,40 @@ +using Ryujinx.HLE.Utilities; +using System.IO; + +namespace Ryujinx.HLE.FileSystem +{ + public class SystemVersion + { + public byte Major { get; } + public byte Minor { get; } + public byte Micro { get; } + public byte RevisionMajor { get; } + public byte RevisionMinor { get; } + public string PlatformString { get; } + public string Hex { get; } + public string VersionString { get; } + public string VersionTitle { get; } + + public SystemVersion(Stream systemVersionFile) + { + using (BinaryReader reader = new BinaryReader(systemVersionFile)) + { + Major = reader.ReadByte(); + Minor = reader.ReadByte(); + Micro = reader.ReadByte(); + + reader.ReadByte(); // Padding + + RevisionMajor = reader.ReadByte(); + RevisionMinor = reader.ReadByte(); + + reader.ReadBytes(2); // Padding + + PlatformString = StringUtils.ReadInlinedAsciiString(reader, 0x20); + Hex = StringUtils.ReadInlinedAsciiString(reader, 0x40); + VersionString = StringUtils.ReadInlinedAsciiString(reader, 0x18); + VersionTitle = StringUtils.ReadInlinedAsciiString(reader, 0x80); + } + } + } +}
\ No newline at end of file |