| 40 | std::shared_ptr<StatusLoggerSink> status_logger_sink; |
| 41 | |
| 42 | void initMainUI() |
| 43 | { |
| 44 | ImPlot::CreateContext(); |
| 45 | |
| 46 | audio::registerSinks(); |
| 47 | offline::setup(); |
| 48 | settings::setup(); |
| 49 | |
| 50 | // Load credits MD |
| 51 | std::ifstream ifs(resources::getResourcePath("credits.md")); |
| 52 | std::string credits_markdown((std::istreambuf_iterator<char>(ifs)), (std::istreambuf_iterator<char>())); |
| 53 | credits_md.set_md(credits_markdown); |
| 54 | |
| 55 | registerViewerHandlers(); |
| 56 | |
| 57 | recorder_app = std::make_shared<RecorderApplication>(); |
| 58 | viewer_app = std::make_shared<ViewerApplication>(); |
| 59 | open_recorder = satdump::config::main_cfg.contains("cli") && satdump::config::main_cfg["cli"].contains("start_recorder_device"); |
| 60 | |
| 61 | eventBus->fire_event<AddGUIApplicationEvent>({other_apps}); |
| 62 | |
| 63 | // Logger status bar sync |
| 64 | status_logger_sink = std::make_shared<StatusLoggerSink>(); |
| 65 | if (status_logger_sink->is_shown()) |
| 66 | logger->add_sink(status_logger_sink); |
| 67 | |
| 68 | // Shut down the logger init buffer manually to prevent init warnings |
| 69 | // From showing as a toast, or in the product processor screen |
| 70 | completeLoggerInit(); |
| 71 | |
| 72 | // Logger notify sink |
| 73 | notify_logger_sink = std::make_shared<NotifyLoggerSink>(); |
| 74 | logger->add_sink(notify_logger_sink); |
| 75 | } |
| 76 | |
| 77 | void exitMainUI() |
| 78 | { |
no test coverage detected