summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ns
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/ns')
-rw-r--r--src/core/hle/service/ns/iplatform_service_manager.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/hle/service/ns/iplatform_service_manager.cpp b/src/core/hle/service/ns/iplatform_service_manager.cpp
index fd047ff26..1fab2f0dd 100644
--- a/src/core/hle/service/ns/iplatform_service_manager.cpp
+++ b/src/core/hle/service/ns/iplatform_service_manager.cpp
@@ -279,13 +279,10 @@ void IPlatformServiceManager::GetSharedFontInOrderOfPriority(Kernel::HLERequestC
font_sizes.push_back(region.size);
}
- // Resize buffers if game requests smaller size output.
- font_codes.resize(
- std::min<std::size_t>(font_codes.size(), ctx.GetWriteBufferSize(0) / sizeof(u32)));
- font_offsets.resize(
- std::min<std::size_t>(font_offsets.size(), ctx.GetWriteBufferSize(1) / sizeof(u32)));
- font_sizes.resize(
- std::min<std::size_t>(font_sizes.size(), ctx.GetWriteBufferSize(2) / sizeof(u32)));
+ // Resize buffers if game requests smaller size output
+ font_codes.resize(std::min(font_codes.size(), ctx.GetWriteBufferNumElements<u32>(0)));
+ font_offsets.resize(std::min(font_offsets.size(), ctx.GetWriteBufferNumElements<u32>(1)));
+ font_sizes.resize(std::min(font_sizes.size(), ctx.GetWriteBufferNumElements<u32>(2)));
ctx.WriteBuffer(font_codes, 0);
ctx.WriteBuffer(font_offsets, 1);