mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-09 06:30:10 +01:00
Migration: finish modules support
This commit is contained in:
@@ -76,6 +76,14 @@ void ffParseGamepadJsonObject(FFGamepadOptions* options, yyjson_val* module)
|
||||
}
|
||||
}
|
||||
|
||||
void ffGenerateGamepadJsonConfig(FFGamepadOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
__attribute__((__cleanup__(ffDestroyGamepadOptions))) FFGamepadOptions defaultOptions;
|
||||
ffInitGamepadOptions(&defaultOptions);
|
||||
|
||||
ffJsonConfigGenerateModuleArgsConfig(doc, module, &defaultOptions.moduleArgs, &options->moduleArgs);
|
||||
}
|
||||
|
||||
void ffGenerateGamepadJsonResult(FF_MAYBE_UNUSED FFGamepadOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
FF_LIST_AUTO_DESTROY result = ffListCreate(sizeof(FFGamepadDevice));
|
||||
@@ -127,7 +135,7 @@ void ffInitGamepadOptions(FFGamepadOptions* options)
|
||||
ffPrintGamepad,
|
||||
ffGenerateGamepadJsonResult,
|
||||
ffPrintGamepadHelpFormat,
|
||||
NULL
|
||||
ffGenerateGamepadJsonConfig
|
||||
);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user