diff --git a/troposphere/daybreak/source/main.cpp b/troposphere/daybreak/source/main.cpp index 0eb1d04bc..88d2db247 100644 --- a/troposphere/daybreak/source/main.cpp +++ b/troposphere/daybreak/source/main.cpp @@ -261,7 +261,10 @@ class Daybreak : public CApplication { int main(int argc, char **argv) { /* Initialize the menu. */ - dbk::InitializeMenu(FramebufferWidth, FramebufferHeight); + if (argc > 1) + dbk::InitializeMenu(FramebufferWidth, FramebufferHeight, argv[1]); + else + dbk::InitializeMenu(FramebufferWidth, FramebufferHeight); Daybreak daybreak; daybreak.run(); diff --git a/troposphere/daybreak/source/ui.cpp b/troposphere/daybreak/source/ui.cpp index c59b638e9..47d0860ad 100644 --- a/troposphere/daybreak/source/ui.cpp +++ b/troposphere/daybreak/source/ui.cpp @@ -1265,6 +1265,16 @@ namespace dbk { g_current_menu = std::make_shared(); } + void InitializeMenu(u32 screen_width, u32 screen_height, const char *update_path) { + InitializeMenu(screen_width, screen_height); + + /* Set the update path. */ + snprintf(g_update_path, sizeof(g_update_path), "%s", update_path); + + /* Change the menu. */ + ChangeMenu(std::make_shared(g_current_menu)); + } + void UpdateMenu(u64 ns) { DBK_ABORT_UNLESS(g_initialized); DBK_ABORT_UNLESS(g_current_menu != nullptr); diff --git a/troposphere/daybreak/source/ui.hpp b/troposphere/daybreak/source/ui.hpp index 481ad4069..41fbe65c1 100644 --- a/troposphere/daybreak/source/ui.hpp +++ b/troposphere/daybreak/source/ui.hpp @@ -264,6 +264,7 @@ namespace dbk { }; void InitializeMenu(u32 screen_width, u32 screen_height); + void InitializeMenu(u32 screen_width, u32 screen_height, const char *update_path); void UpdateMenu(u64 ns); void RenderMenu(NVGcontext *vg, u64 ns); bool IsExitRequested();