mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-08-22 10:18:51 +00:00
Add arguments support to Daybreak
This commit is contained in:
parent
f5704d25f8
commit
d159b54f6b
3 changed files with 15 additions and 1 deletions
|
@ -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();
|
||||
|
|
|
@ -1265,6 +1265,16 @@ namespace dbk {
|
|||
g_current_menu = std::make_shared<MainMenu>();
|
||||
}
|
||||
|
||||
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<ValidateUpdateMenu>(g_current_menu));
|
||||
}
|
||||
|
||||
void UpdateMenu(u64 ns) {
|
||||
DBK_ABORT_UNLESS(g_initialized);
|
||||
DBK_ABORT_UNLESS(g_current_menu != nullptr);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue