summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-06-15 09:35:43 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-06-16 07:46:45 +0200
commite4318a191457f5e46eca20060c8ebcab3e6758eb (patch)
treeccc04b267629c6767de9295ac76361c281ddea3e /src/core/file_sys
parentspl: Add the general SPL interface (diff)
downloadyuzu-e4318a191457f5e46eca20060c8ebcab3e6758eb.tar
yuzu-e4318a191457f5e46eca20060c8ebcab3e6758eb.tar.gz
yuzu-e4318a191457f5e46eca20060c8ebcab3e6758eb.tar.bz2
yuzu-e4318a191457f5e46eca20060c8ebcab3e6758eb.tar.lz
yuzu-e4318a191457f5e46eca20060c8ebcab3e6758eb.tar.xz
yuzu-e4318a191457f5e46eca20060c8ebcab3e6758eb.tar.zst
yuzu-e4318a191457f5e46eca20060c8ebcab3e6758eb.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/system_archive/system_version.cpp48
1 files changed, 15 insertions, 33 deletions
diff --git a/src/core/file_sys/system_archive/system_version.cpp b/src/core/file_sys/system_archive/system_version.cpp
index 54704105b..9b76d007e 100644
--- a/src/core/file_sys/system_archive/system_version.cpp
+++ b/src/core/file_sys/system_archive/system_version.cpp
@@ -4,47 +4,29 @@
#include "core/file_sys/system_archive/system_version.h"
#include "core/file_sys/vfs_vector.h"
+#include "core/hle/api_version.h"
namespace FileSys::SystemArchive {
-namespace SystemVersionData {
-
-// This section should reflect the best system version to describe yuzu's HLE api.
-// TODO(DarkLordZach): Update when HLE gets better.
-
-constexpr u8 VERSION_MAJOR = 11;
-constexpr u8 VERSION_MINOR = 0;
-constexpr u8 VERSION_MICRO = 1;
-
-constexpr u8 REVISION_MAJOR = 1;
-constexpr u8 REVISION_MINOR = 0;
-
-constexpr char PLATFORM_STRING[] = "NX";
-constexpr char VERSION_HASH[] = "69103fcb2004dace877094c2f8c29e6113be5dbf";
-constexpr char DISPLAY_VERSION[] = "11.0.1";
-constexpr char DISPLAY_TITLE[] = "NintendoSDK Firmware for NX 11.0.1-1.0";
-
-} // namespace SystemVersionData
-
std::string GetLongDisplayVersion() {
- return SystemVersionData::DISPLAY_TITLE;
+ return HLE::ApiVersion::DISPLAY_TITLE;
}
VirtualDir SystemVersion() {
VirtualFile file = std::make_shared<VectorVfsFile>(std::vector<u8>(0x100), "file");
- file->WriteObject(SystemVersionData::VERSION_MAJOR, 0);
- file->WriteObject(SystemVersionData::VERSION_MINOR, 1);
- file->WriteObject(SystemVersionData::VERSION_MICRO, 2);
- file->WriteObject(SystemVersionData::REVISION_MAJOR, 4);
- file->WriteObject(SystemVersionData::REVISION_MINOR, 5);
- file->WriteArray(SystemVersionData::PLATFORM_STRING,
- std::min<u64>(sizeof(SystemVersionData::PLATFORM_STRING), 0x20ULL), 0x8);
- file->WriteArray(SystemVersionData::VERSION_HASH,
- std::min<u64>(sizeof(SystemVersionData::VERSION_HASH), 0x40ULL), 0x28);
- file->WriteArray(SystemVersionData::DISPLAY_VERSION,
- std::min<u64>(sizeof(SystemVersionData::DISPLAY_VERSION), 0x18ULL), 0x68);
- file->WriteArray(SystemVersionData::DISPLAY_TITLE,
- std::min<u64>(sizeof(SystemVersionData::DISPLAY_TITLE), 0x80ULL), 0x80);
+ file->WriteObject(HLE::ApiVersion::HOS_VERSION_MAJOR, 0);
+ file->WriteObject(HLE::ApiVersion::HOS_VERSION_MINOR, 1);
+ file->WriteObject(HLE::ApiVersion::HOS_VERSION_MICRO, 2);
+ file->WriteObject(HLE::ApiVersion::SDK_REVISION_MAJOR, 4);
+ file->WriteObject(HLE::ApiVersion::SDK_REVISION_MINOR, 5);
+ file->WriteArray(HLE::ApiVersion::PLATFORM_STRING,
+ std::min<u64>(sizeof(HLE::ApiVersion::PLATFORM_STRING), 0x20ULL), 0x8);
+ file->WriteArray(HLE::ApiVersion::VERSION_HASH,
+ std::min<u64>(sizeof(HLE::ApiVersion::VERSION_HASH), 0x40ULL), 0x28);
+ file->WriteArray(HLE::ApiVersion::DISPLAY_VERSION,
+ std::min<u64>(sizeof(HLE::ApiVersion::DISPLAY_VERSION), 0x18ULL), 0x68);
+ file->WriteArray(HLE::ApiVersion::DISPLAY_TITLE,
+ std::min<u64>(sizeof(HLE::ApiVersion::DISPLAY_TITLE), 0x80ULL), 0x80);
return std::make_shared<VectorVfsDirectory>(std::vector<VirtualFile>{file},
std::vector<VirtualDir>{}, "data");
}