| 293 | // uMenu procedure: read sent storages, initialize RomFs (externally), load config and other stuff, finally create the renderer and start the UI |
| 294 | |
| 295 | int main() { |
| 296 | InitializeSettings(); |
| 297 | |
| 298 | UL_RC_ASSERT(ul::menu::am::ReadStartMode(g_StartMode)); |
| 299 | UL_ASSERT_TRUE(g_StartMode != ul::smi::MenuStartMode::Invalid); |
| 300 | |
| 301 | // Information sent as an extra storage to uMenu |
| 302 | UL_RC_ASSERT(ul::menu::am::ReadFromInputStorage(&g_GlobalSettings.system_status, sizeof(g_GlobalSettings.system_status))); |
| 303 | g_GlobalSettings.initial_last_menu_index = g_GlobalSettings.system_status.last_menu_index; |
| 304 | g_GlobalSettings.initial_last_menu_fs_path = g_GlobalSettings.system_status.last_menu_fs_path; |
| 305 | UL_LOG_INFO("Start mode: %d, last path: '%s', last fs path: '%s', last menu index: %d", (u32)g_StartMode, g_GlobalSettings.system_status.last_menu_path, g_GlobalSettings.system_status.last_menu_fs_path, g_GlobalSettings.system_status.last_menu_index); |
| 306 | |
| 307 | // Check if our RomFs data exists... |
| 308 | if(!ul::fs::ExistsFile(ul::MenuRomfsFile)) { |
| 309 | UL_RC_ASSERT(ul::ResultRomfsNotFound); |
| 310 | } |
| 311 | |
| 312 | // Try to mount it |
| 313 | UL_RC_ASSERT(romfsMountFromFsdev(ul::MenuRomfsFile, 0, "romfs")); |
| 314 | |
| 315 | // Register handlers for HOME button press detection |
| 316 | ul::menu::am::RegisterLibnxLibappletHomeButtonDetection(); |
| 317 | ul::menu::ui::QuickMenu::RegisterHomeButtonDetection(); |
| 318 | |
| 319 | MainLoop(); |
| 320 | |
| 321 | return 0; |
| 322 | } |
nothing calls this directly
no test coverage detected