summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ns
diff options
context:
space:
mode:
authorfearlessTobi <thm.frey@gmail.com>2018-09-15 15:21:06 +0200
committerfearlessTobi <thm.frey@gmail.com>2018-09-15 15:21:06 +0200
commit63c2e32e207d31ecadd9022e1d7cd705c9febac8 (patch)
tree8a90e8ef2804f147dff7225a543a8740ecf7160c /src/core/hle/service/ns
parentMerge pull request #1310 from lioncash/kernel-ns (diff)
downloadyuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.gz
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.bz2
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.lz
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.xz
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.zst
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.zip
Diffstat (limited to 'src/core/hle/service/ns')
-rw-r--r--src/core/hle/service/ns/pl_u.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp
index 447689a1a..1069d103f 100644
--- a/src/core/hle/service/ns/pl_u.cpp
+++ b/src/core/hle/service/ns/pl_u.cpp
@@ -78,7 +78,7 @@ enum class LoadState : u32 {
};
static void DecryptSharedFont(const std::vector<u32>& input, std::vector<u8>& output,
- size_t& offset) {
+ std::size_t& offset) {
ASSERT_MSG(offset + (input.size() * sizeof(u32)) < SHARED_FONT_MEM_SIZE,
"Shared fonts exceeds 17mb!");
ASSERT_MSG(input[0] == EXPECTED_MAGIC, "Failed to derive key, unexpected magic number");
@@ -95,7 +95,7 @@ static void DecryptSharedFont(const std::vector<u32>& input, std::vector<u8>& ou
}
static void EncryptSharedFont(const std::vector<u8>& input, std::vector<u8>& output,
- size_t& offset) {
+ std::size_t& offset) {
ASSERT_MSG(offset + input.size() + 8 < SHARED_FONT_MEM_SIZE, "Shared fonts exceeds 17mb!");
const u32 KEY = EXPECTED_MAGIC ^ EXPECTED_RESULT;
std::memcpy(output.data() + offset, &EXPECTED_RESULT, sizeof(u32)); // Magic header
@@ -113,7 +113,7 @@ static u32 GetU32Swapped(const u8* data) {
}
struct PL_U::Impl {
- const FontRegion& GetSharedFontRegion(size_t index) const {
+ const FontRegion& GetSharedFontRegion(std::size_t index) const {
if (index >= shared_font_regions.size() || shared_font_regions.empty()) {
// No font fallback
return EMPTY_REGION;
@@ -126,7 +126,7 @@ struct PL_U::Impl {
// based on the shared memory dump
unsigned cur_offset = 0;
- for (size_t i = 0; i < SHARED_FONTS.size(); i++) {
+ for (std::size_t i = 0; i < SHARED_FONTS.size(); i++) {
// Out of shared fonts/invalid font
if (GetU32Swapped(input.data() + cur_offset) != EXPECTED_RESULT) {
break;
@@ -162,7 +162,7 @@ PL_U::PL_U() : ServiceFramework("pl:u"), impl{std::make_unique<Impl>()} {
RegisterHandlers(functions);
// Attempt to load shared font data from disk
const auto nand = FileSystem::GetSystemNANDContents();
- size_t offset = 0;
+ std::size_t offset = 0;
// Rebuild shared fonts from data ncas
if (nand->HasEntry(static_cast<u64>(FontArchives::Standard),
FileSys::ContentRecordType::Data)) {
@@ -344,7 +344,7 @@ void PL_U::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) {
std::vector<u32> font_sizes;
// TODO(ogniK): Have actual priority order
- for (size_t i = 0; i < impl->shared_font_regions.size(); i++) {
+ for (std::size_t i = 0; i < impl->shared_font_regions.size(); i++) {
font_codes.push_back(static_cast<u32>(i));
auto region = impl->GetSharedFontRegion(i);
font_offsets.push_back(region.offset);