From 25e07fd573b9a54d6fa8ee0922b41befdd8222d2 Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 10 Aug 2024 20:49:34 -0400 Subject: [PATCH] pass rom filename into controller --- src/app/core/controller.h | 2 +- src/ios/main.mm | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/core/controller.h b/src/app/core/controller.h index 527cdb96..4e6aace0 100644 --- a/src/app/core/controller.h +++ b/src/app/core/controller.h @@ -47,7 +47,7 @@ class Controller : public ExperimentFlags { absl::Status LoadFontFamilies() const; absl::Status LoadAudioDevice(); - void SetupScreen() { editor_manager_.SetupScreen(); } + void SetupScreen(std::string filename = "") { editor_manager_.SetupScreen(filename); } auto editor_manager() -> editor::EditorManager & { return editor_manager_; } auto renderer() -> SDL_Renderer * { return Renderer::GetInstance().renderer(); diff --git a/src/ios/main.mm b/src/ios/main.mm index 5c183fd8..478c7be0 100644 --- a/src/ios/main.mm +++ b/src/ios/main.mm @@ -91,11 +91,10 @@ ImGui_ImplSDL2_InitForSDLRenderer(_controller->window(), _controller->renderer()); ImGui_ImplSDLRenderer2_Init(_controller->renderer()); - _controller->editor_manager().overworld_editor().InitializeZeml(); if (!_controller->LoadFontFamilies().ok()) { abort(); } - _controller->SetupScreen(); + _controller->SetupScreen(rom_filename); _hoverGestureRecognizer = [[UIHoverGestureRecognizer alloc] initWithTarget:self action:@selector(hoverGesture:)]; [self.view addGestureRecognizer:_hoverGestureRecognizer];