mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 00:03:58 +01:00
Migration: finish modules support
This commit is contained in:
@@ -100,6 +100,14 @@ void ffParsePlayerJsonObject(FFPlayerOptions* options, yyjson_val* module)
|
||||
}
|
||||
}
|
||||
|
||||
void ffGeneratePlayerJsonConfig(FFPlayerOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
__attribute__((__cleanup__(ffDestroyPlayerOptions))) FFPlayerOptions defaultOptions;
|
||||
ffInitPlayerOptions(&defaultOptions);
|
||||
|
||||
ffJsonConfigGenerateModuleArgsConfig(doc, module, &defaultOptions.moduleArgs, &options->moduleArgs);
|
||||
}
|
||||
|
||||
void ffGeneratePlayerJsonResult(FF_MAYBE_UNUSED FFMediaOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
const FFMediaResult* media = ffDetectMedia();
|
||||
@@ -136,7 +144,7 @@ void ffInitPlayerOptions(FFPlayerOptions* options)
|
||||
ffPrintPlayer,
|
||||
ffGeneratePlayerJsonResult,
|
||||
ffPrintPlayerHelpFormat,
|
||||
NULL
|
||||
ffGeneratePlayerJsonConfig
|
||||
);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user