mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-04 04:04:17 +01:00
Global: improve support of --help *-format
Also fix some bugs found when refactoring
This commit is contained in:
@@ -44,7 +44,7 @@ void ffPrintOpenGL(FFOpenGLOptions* options)
|
||||
|
||||
void ffInitOpenGLOptions(FFOpenGLOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_OPENGL_MODULE_NAME, ffParseOpenGLCommandOptions, ffParseOpenGLJsonObject, ffPrintOpenGL, ffGenerateOpenGLJson);
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_OPENGL_MODULE_NAME, ffParseOpenGLCommandOptions, ffParseOpenGLJsonObject, ffPrintOpenGL, ffGenerateOpenGLJson, ffPrintOpenGLHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
@@ -143,3 +143,13 @@ void ffGenerateOpenGLJson(FF_MAYBE_UNUSED FFOpenGLOptions* options, yyjson_mut_d
|
||||
ffStrbufDestroy(&result.vendor);
|
||||
ffStrbufDestroy(&result.slv);
|
||||
}
|
||||
|
||||
void ffPrintOpenGLHelpFormat(void)
|
||||
{
|
||||
ffPrintModuleFormatHelp(FF_OPENGL_MODULE_NAME, "{1}", FF_OPENGL_NUM_FORMAT_ARGS, (const char* []) {
|
||||
"version",
|
||||
"renderer",
|
||||
"vendor",
|
||||
"shading language version"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ bool ffParseOpenGLCommandOptions(FFOpenGLOptions* options, const char* key, cons
|
||||
void ffDestroyOpenGLOptions(FFOpenGLOptions* options);
|
||||
void ffParseOpenGLJsonObject(FFOpenGLOptions* options, yyjson_val* module);
|
||||
void ffGenerateOpenGLJson(FFOpenGLOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintOpenGLHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user