diff --git a/firmware/application/event_m0.cpp b/firmware/application/event_m0.cpp index 47b0cd23..f0f0bdb4 100644 --- a/firmware/application/event_m0.cpp +++ b/firmware/application/event_m0.cpp @@ -62,10 +62,9 @@ Thread* EventDispatcher::thread_event_loop = nullptr; EventDispatcher::EventDispatcher( ui::Widget* const top_widget, - ui::Painter& painter, ui::Context& context ) : top_widget { top_widget }, - painter(painter), + painter { }, context(context) { init_message_queues(); diff --git a/firmware/application/event_m0.hpp b/firmware/application/event_m0.hpp index 947f51ee..6c716488 100644 --- a/firmware/application/event_m0.hpp +++ b/firmware/application/event_m0.hpp @@ -50,7 +50,6 @@ class EventDispatcher { public: EventDispatcher( ui::Widget* const top_widget, - ui::Painter& painter, ui::Context& context ); @@ -87,7 +86,7 @@ private: touch::Manager touch_manager; ui::Widget* const top_widget; - ui::Painter& painter; + ui::Painter painter; ui::Context& context; uint32_t encoder_last = 0; bool is_running = true; diff --git a/firmware/application/main.cpp b/firmware/application/main.cpp index 63f9a822..0475073c 100755 --- a/firmware/application/main.cpp +++ b/firmware/application/main.cpp @@ -57,9 +57,8 @@ static void event_loop() { context, portapack::display.screen_rect() }; - ui::Painter painter; - EventDispatcher event_dispatcher { &system_view, painter, context }; + EventDispatcher event_dispatcher { &system_view, context }; MessageHandlerRegistration message_handler_shutdown { Message::ID::Shutdown,