mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-05 04:34:19 +01:00
Migration: finish modules support
This commit is contained in:
+9
-1
@@ -163,6 +163,14 @@ void ffParseOSJsonObject(FFOSOptions* options, yyjson_val* module)
|
||||
}
|
||||
}
|
||||
|
||||
void ffGenerateOSJsonConfig(FFOSOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
__attribute__((__cleanup__(ffDestroyOSOptions))) FFOSOptions defaultOptions;
|
||||
ffInitOSOptions(&defaultOptions);
|
||||
|
||||
ffJsonConfigGenerateModuleArgsConfig(doc, module, &defaultOptions.moduleArgs, &options->moduleArgs);
|
||||
}
|
||||
|
||||
void ffGenerateOSJsonResult(FF_MAYBE_UNUSED FFOSOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
const FFOSResult* os = ffDetectOS();
|
||||
@@ -214,7 +222,7 @@ void ffInitOSOptions(FFOSOptions* options)
|
||||
ffPrintOS,
|
||||
ffGenerateOSJsonResult,
|
||||
ffPrintOSHelpFormat,
|
||||
NULL
|
||||
ffGenerateOSJsonConfig
|
||||
);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user