diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-09-23 15:52:49 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-10-13 19:46:27 +0200 |
commit | 1911f853918669f3258259b51ebc3dac19ed61ef (patch) | |
tree | da540e440ccbff0a21a4492f2fdb1cf87cc6b878 /src/core/file_sys/system_archive | |
parent | pl_u: Use kernel physical memory (diff) | |
download | yuzu-1911f853918669f3258259b51ebc3dac19ed61ef.tar yuzu-1911f853918669f3258259b51ebc3dac19ed61ef.tar.gz yuzu-1911f853918669f3258259b51ebc3dac19ed61ef.tar.bz2 yuzu-1911f853918669f3258259b51ebc3dac19ed61ef.tar.lz yuzu-1911f853918669f3258259b51ebc3dac19ed61ef.tar.xz yuzu-1911f853918669f3258259b51ebc3dac19ed61ef.tar.zst yuzu-1911f853918669f3258259b51ebc3dac19ed61ef.zip |
Diffstat (limited to 'src/core/file_sys/system_archive')
-rw-r--r-- | src/core/file_sys/system_archive/shared_font.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/file_sys/system_archive/shared_font.cpp b/src/core/file_sys/system_archive/shared_font.cpp index 5bb596824..2c05eb42e 100644 --- a/src/core/file_sys/system_archive/shared_font.cpp +++ b/src/core/file_sys/system_archive/shared_font.cpp @@ -18,16 +18,14 @@ namespace { template <std::size_t Size> VirtualFile PackBFTTF(const std::array<u8, Size>& data, const std::string& name) { - std::vector<u8> vec(Size); - std::memcpy(vec.data(), data.data(), vec.size()); + std::vector<u32> vec(Size / sizeof(u32)); + std::memcpy(vec.data(), data.data(), vec.size() * sizeof(u32)); - Kernel::PhysicalMemory bfttf(Size + sizeof(u64)); + std::vector<u8> bfttf(Size + sizeof(u64)); - Service::NS::EncryptSharedFont(vec, bfttf); - - std::vector<u8> bfttf_vec(Size + sizeof(u64)); - std::memcpy(bfttf_vec.data(), bfttf.data(), bfttf_vec.size()); - return std::make_shared<VectorVfsFile>(std::move(bfttf_vec), name); + u64 offset = 0; + Service::NS::EncryptSharedFont(vec, bfttf, offset); + return std::make_shared<VectorVfsFile>(std::move(bfttf), name); } } // Anonymous namespace |