this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added Startup Options info to the help

Nesbox 8f17ae25 62220f9a

+48 -11
+28 -1
src/studio/screens/console.c
··· 74 74 macro(vram) \ 75 75 macro(commands) \ 76 76 macro(api) \ 77 + macro(startup) \ 77 78 macro(terms) \ 78 79 macro(license) 79 80 ··· 161 162 "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, " 162 163 "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE " 163 164 "SOFTWARE."; 165 + 166 + static const struct StartupOption {const char* name; const char* help;} StartupOptions[] = 167 + { 168 + #define CMD_PARAMS_DEF(name, type, post, help) {#name post, help}, 169 + CMD_PARAMS_LIST(CMD_PARAMS_DEF) 170 + #undef CMD_PARAMS_DEF 171 + }; 164 172 165 173 struct CommandDesc 166 174 { ··· 2776 2784 FOR(const ApiItem*, api, Api) 2777 2785 ptr += sprintf(ptr, "\n### %s\n`%s`\n%s\n", api->name, api->def, api->help); 2778 2786 2779 - ptr += sprintf(ptr, "\n%s\n\n%s", TermsText, LicenseText); 2787 + ptr += sprintf(ptr, "\n## Startup options\n```\n"); 2788 + FOR(const struct StartupOption*, opt, StartupOptions) 2789 + ptr += sprintf(ptr, "--%-14s %s\n", opt->name, opt->help); 2790 + 2791 + ptr += sprintf(ptr, "```\n\n%s\n\n%s", TermsText, LicenseText); 2780 2792 2781 2793 onFileExported(console, filename, tic_fs_save(console->fs, filename, buf, strlen(buf), true)); 2782 2794 } ··· 3007 3019 { 3008 3020 printLine(console); 3009 3021 printBack(console, WelcomeText); 3022 + } 3023 + 3024 + static void onHelp_startup(Console* console) 3025 + { 3026 + printLine(console); 3027 + char buf[16]; 3028 + 3029 + FOR(const struct StartupOption*, opt, StartupOptions) 3030 + { 3031 + sprintf(buf, "--%-10s", opt->name); 3032 + printFront(console, buf); 3033 + printBack(console, " "); 3034 + printBack(console, opt->help); 3035 + printLine(console); 3036 + } 3010 3037 } 3011 3038 3012 3039 static void onHelp_terms(Console* console)
+17
src/studio/screens/console.h
··· 24 24 25 25 #include "studio/studio.h" 26 26 27 + #if defined(CRT_SHADER_SUPPORT) 28 + # define CRT_CMD_PARAM(macro) \ 29 + macro(crt, BOOLEAN, "", "enable CRT monitor effect") 30 + #else 31 + # define CRT_CMD_PARAM(macro) 32 + #endif 33 + 34 + #define CMD_PARAMS_LIST(macro) \ 35 + macro(skip, BOOLEAN, "", "skip startup animation") \ 36 + macro(nosound, BOOLEAN, "", "disable sound output") \ 37 + macro(cli, BOOLEAN, "", "console only output") \ 38 + macro(fullscreen, BOOLEAN, "", "enable fullscreen mode") \ 39 + macro(fs, STRING, "=<str>", "path to the file system folder") \ 40 + macro(scale, INTEGER, "=<int>", "main window scale") \ 41 + macro(cmd, STRING, "=<str>", "run commands in the console") \ 42 + CRT_CMD_PARAM(macro) 43 + 27 44 typedef void(*fs_done_callback)(void* data); 28 45 29 46 typedef enum
+3 -10
src/studio/studio.c
··· 2058 2058 struct argparse_option options[] = 2059 2059 { 2060 2060 OPT_HELP(), 2061 - OPT_BOOLEAN('\0', "skip", &args.skip, "skip startup animation"), 2062 - OPT_BOOLEAN('\0', "nosound", &args.nosound, "disable sound output"), 2063 - OPT_BOOLEAN('\0', "cli", &args.cli, "console only output"), 2064 - OPT_BOOLEAN('\0', "fullscreen", &args.fullscreen, "enable fullscreen mode"), 2065 - OPT_STRING('\0', "fs", &args.fs, "path to the file system folder"), 2066 - OPT_INTEGER('\0', "scale", &args.scale, "main window scale"), 2067 - #if defined(CRT_SHADER_SUPPORT) 2068 - OPT_BOOLEAN('\0', "crt", &args.crt, "enable CRT monitor effect"), 2069 - #endif 2070 - OPT_STRING('\0', "cmd", &args.cmd, "run commands in the console"), 2061 + #define CMD_PARAMS_DEF(name, type, post, help) OPT_##type('\0', #name, &args.name, help), 2062 + CMD_PARAMS_LIST(CMD_PARAMS_DEF) 2063 + #undef CMD_PARAMS_DEF 2071 2064 OPT_END(), 2072 2065 }; 2073 2066