ImGuiEngine: Minor cleanup

This commit is contained in:
Luke Street 2022-02-22 21:08:35 -05:00
parent edf18d47d7
commit 7903213ff5
1 changed files with 6 additions and 4 deletions

View File

@ -31,10 +31,12 @@ void ImGuiEngine_Initialize(float scale) {
ImGuiIO& io = ImGui::GetIO();
auto* fontData = new uint8_t[NOTO_MONO_FONT_DECOMPRESSED_SZ];
metaforce::CMemoryInStream memStream(static_cast<const u8*>(NOTO_MONO_FONT), NOTO_MONO_FONT_SZ,
metaforce::CMemoryInStream::EOwnerShip::NotOwned);
metaforce::CZipInputStream zipInputStream(std::make_unique<metaforce::CMemoryInStream>(memStream));
{
auto stream = std::make_unique<metaforce::CMemoryInStream>(
static_cast<const u8*>(NOTO_MONO_FONT), NOTO_MONO_FONT_SZ, metaforce::CMemoryInStream::EOwnerShip::NotOwned);
metaforce::CZipInputStream zipInputStream{std::move(stream)};
zipInputStream.Get(fontData, NOTO_MONO_FONT_DECOMPRESSED_SZ);
}
ImFontConfig fontConfig{};
fontConfig.FontData = fontData;