From 61413b5a3bc3ceac20c9c6004768e2938e64a85f Mon Sep 17 00:00:00 2001 From: scawful Date: Thu, 13 Mar 2025 09:28:30 -0400 Subject: [PATCH] Fix ImGui initialization and rendering flow; update font loading method and improve ROM data loading function --- src/ios/main.mm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ios/main.mm b/src/ios/main.mm index a80a05cc..c6be03f8 100644 --- a/src/ios/main.mm +++ b/src/ios/main.mm @@ -87,10 +87,10 @@ } ImGui_ImplSDL2_InitForSDLRenderer(_controller->window(), - core::Renderer::GetInstance().renderer()); - ImGui_ImplSDLRenderer2_Init(core::Renderer::GetInstance().renderer()); + yaze::core::Renderer::GetInstance().renderer()); + ImGui_ImplSDLRenderer2_Init(yaze::core::Renderer::GetInstance().renderer()); - if (!_controller->LoadFontFamilies().ok()) { + if (!LoadPackageFonts().ok()) { abort(); } _controller->Initialize(""); @@ -167,8 +167,8 @@ if (!controller_status.ok()) { abort(); } - ImGui::End(); } + ImGui::End(); _controller->DoRender(); } @@ -357,7 +357,7 @@ rom_data.resize(size); std::copy(bytes, bytes + size, rom_data.begin()); - PRINT_IF_ERROR(yaze::SharedRom::shared_rom_->LoadFromBytes(rom_data)); + PRINT_IF_ERROR(yaze::SharedRom::shared_rom_->LoadFromData(rom_data)); std::string filename = std::string([selectedFileURL.path UTF8String]); yaze::SharedRom::shared_rom_->set_filename(filename); [selectedFileURL stopAccessingSecurityScopedResource];