summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2014-12-21 05:33:33 +0100
committerSubv <subv2112@gmail.com>2014-12-21 22:39:20 +0100
commita1b9b80a55121320fa543fa40fcde0addb205d24 (patch)
treee279c4eac2baf3ccf1914dd67ab4539be86368e9 /src
parentCFG_U: Use Common::make_unique instead of the std version (diff)
downloadyuzu-a1b9b80a55121320fa543fa40fcde0addb205d24.tar
yuzu-a1b9b80a55121320fa543fa40fcde0addb205d24.tar.gz
yuzu-a1b9b80a55121320fa543fa40fcde0addb205d24.tar.bz2
yuzu-a1b9b80a55121320fa543fa40fcde0addb205d24.tar.lz
yuzu-a1b9b80a55121320fa543fa40fcde0addb205d24.tar.xz
yuzu-a1b9b80a55121320fa543fa40fcde0addb205d24.tar.zst
yuzu-a1b9b80a55121320fa543fa40fcde0addb205d24.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/archive_systemsavedata.cpp9
-rw-r--r--src/core/hle/service/cfg_u.cpp9
2 files changed, 12 insertions, 6 deletions
diff --git a/src/core/file_sys/archive_systemsavedata.cpp b/src/core/file_sys/archive_systemsavedata.cpp
index b942864b2..0da32d510 100644
--- a/src/core/file_sys/archive_systemsavedata.cpp
+++ b/src/core/file_sys/archive_systemsavedata.cpp
@@ -16,9 +16,14 @@
namespace FileSys {
+static std::string GetSystemSaveDataPath(const std::string& mount_point, u64 save_id) {
+ u32 save_high = static_cast<u32>((save_id >> 32) & 0xFFFFFFFF);
+ u32 save_low = static_cast<u32>(save_id & 0xFFFFFFFF);
+ return Common::StringFromFormat("%s%08X/%08X/", mount_point.c_str(), save_low, save_high);
+}
+
Archive_SystemSaveData::Archive_SystemSaveData(const std::string& mount_point, u64 save_id)
- : DiskArchive(Common::StringFromFormat("%s%08X/%08X/", mount_point.c_str(),
- static_cast<u32>(save_id & 0xFFFFFFFF), static_cast<u32>((save_id >> 32) & 0xFFFFFFFF))) {
+ : DiskArchive(GetSystemSaveDataPath(mount_point, save_id)) {
LOG_INFO(Service_FS, "Directory %s set as SystemSaveData.", this->mount_point.c_str());
}
diff --git a/src/core/hle/service/cfg_u.cpp b/src/core/hle/service/cfg_u.cpp
index 5d21fcae8..ca70e48b6 100644
--- a/src/core/hle/service/cfg_u.cpp
+++ b/src/core/hle/service/cfg_u.cpp
@@ -59,9 +59,9 @@ static std::array<u8, CONFIG_SAVEFILE_SIZE> cfg_config_file_buffer = { };
/// TODO(Subv): Find out what this actually is
/// Thanks Normmatt for providing this information
-static const u8 STEREO_CAMERA_SETTINGS[32] = {
- 0x00, 0x00, 0x78, 0x42, 0x00, 0x80, 0x90, 0x43, 0x9A, 0x99, 0x99, 0x42, 0xEC, 0x51, 0x38, 0x42,
- 0x00, 0x00, 0x20, 0x41, 0x00, 0x00, 0xA0, 0x40, 0xEC, 0x51, 0x5E, 0x42, 0x5C, 0x8F, 0xAC, 0x41
+static const std::array<float, 8> STEREO_CAMERA_SETTINGS = {
+ 62.0f, 289.0f, 76.80000305175781f, 46.08000183105469f,
+ 10.0f, 5.0f, 55.58000183105469f, 21.56999969482422f
};
// TODO(Link Mauve): use a constexpr once MSVC starts supporting it.
@@ -293,7 +293,8 @@ ResultCode FormatConfig() {
SaveFileConfig* config = reinterpret_cast<SaveFileConfig*>(cfg_config_file_buffer.data());
config->data_entries_offset = 0x455C;
// Insert the default blocks
- res = CreateConfigInfoBlk(0x00050005, 0x20, 0xE, STEREO_CAMERA_SETTINGS);
+ res = CreateConfigInfoBlk(0x00050005, 0x20, 0xE,
+ reinterpret_cast<u8 const*>(STEREO_CAMERA_SETTINGS.data()));
if (!res.IsSuccess())
return res;
res = CreateConfigInfoBlk(0x00090001, 0x8, 0xE, reinterpret_cast<u8 const*>(&CONSOLE_UNIQUE_ID));