File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed
Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ typedef struct
3333 uint8_t doAni ;
3434 uint8_t update ;
3535 uint8_t usb_dev ;
36+ uint8_t dbglog ;
3637 uint32_t user_id ;
3738 uint64_t psid [2 ];
3839 uint64_t account_id ;
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ app_config_t apollo_config = {
5757 .doSort = 1 ,
5858 .doAni = 1 ,
5959 .update = 1 ,
60+ .dbglog = 0 ,
6061 .usb_dev = 9 ,
6162 .user_id = 0 ,
6263 .psid = {0 , 0 },
@@ -615,13 +616,19 @@ s32 main(s32 argc, const char* argv[])
615616 // Load application settings
616617 load_app_settings (& apollo_config );
617618
619+ if (apollo_config .dbglog )
620+ {
621+ dbglogger_init_mode (FILE_LOGGER , APOLLO_PATH "apollo.log" , 0 );
622+ notify_popup (NOTIFICATION_ICON_DEFAULT , "Debug Logging Enabled\n%s" , APOLLO_PATH "apollo.log" );
623+ }
624+
618625 // Unpack application data on first run
619626 if (strncmp (apollo_config .app_ver , APOLLO_VERSION , sizeof (apollo_config .app_ver )) != 0 )
620627 {
621628 LOG ("Unpacking application data..." );
622629// clean_directory(APOLLO_DATA_PATH);
623630 if (extract_zip (APOLLO_APP_PATH "misc/appdata.zip" , APOLLO_DATA_PATH ))
624- show_message ( "Successfully installed local application data" );
631+ notify_popup ( NOTIFICATION_ICON_DEFAULT , "Successfully installed local application data" );
625632
626633 strncpy (apollo_config .app_ver , APOLLO_VERSION , sizeof (apollo_config .app_ver ));
627634 save_app_settings (& apollo_config );
Original file line number Diff line number Diff line change @@ -76,8 +76,8 @@ menu_option_t menu_options[] = {
7676 },
7777 { .name = "\nEnable Debug Log" ,
7878 .options = NULL ,
79- .type = APP_OPTION_CALL ,
80- .value = NULL ,
79+ .type = APP_OPTION_BOOL ,
80+ .value = & apollo_config . dbglog ,
8181 .callback = log_callback
8282 },
8383 { .name = NULL }
@@ -218,8 +218,17 @@ void update_callback(int sel)
218218
219219static void log_callback (int sel )
220220{
221- dbglogger_init_mode (FILE_LOGGER , APOLLO_PATH "apollo.log" , 1 );
222- show_message ("Debug Logging Enabled!\n\n" APOLLO_PATH "apollo.log" );
221+ apollo_config .dbglog = !sel ;
222+
223+ if (!apollo_config .dbglog )
224+ {
225+ dbglogger_stop ();
226+ show_message ("Debug Logging Disabled" );
227+ return ;
228+ }
229+
230+ dbglogger_init_mode (FILE_LOGGER , APOLLO_PATH "apollo.log" , 0 );
231+ show_message ("Debug Logging Enabled\n\n%s" , APOLLO_PATH "apollo.log" );
223232}
224233
225234int save_app_settings (app_config_t * config )
You can’t perform that action at this time.
0 commit comments