mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
pl_u: Use kernel physical memory
This commit is contained in:
parent
885ea2de2a
commit
2a4730cbee
2 changed files with 8 additions and 4 deletions
|
@ -18,13 +18,16 @@ namespace {
|
||||||
|
|
||||||
template <std::size_t Size>
|
template <std::size_t Size>
|
||||||
VirtualFile PackBFTTF(const std::array<u8, Size>& data, const std::string& name) {
|
VirtualFile PackBFTTF(const std::array<u8, Size>& data, const std::string& name) {
|
||||||
std::vector<u32> vec(Size / sizeof(u32));
|
std::vector<u8> vec(Size);
|
||||||
std::memcpy(vec.data(), data.data(), vec.size() * sizeof(u32));
|
std::memcpy(vec.data(), data.data(), vec.size());
|
||||||
|
|
||||||
std::vector<u8> bfttf(Size + sizeof(u64));
|
Kernel::PhysicalMemory bfttf(Size + sizeof(u64));
|
||||||
|
|
||||||
Service::NS::EncryptSharedFont(vec, bfttf);
|
Service::NS::EncryptSharedFont(vec, bfttf);
|
||||||
return std::make_shared<VectorVfsFile>(std::move(bfttf), name);
|
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include "core/hle/kernel/physical_memory.h"
|
||||||
#include "core/hle/service/service.h"
|
#include "core/hle/service/service.h"
|
||||||
|
|
||||||
namespace Service::NS {
|
namespace Service::NS {
|
||||||
|
|
Loading…
Reference in a new issue