mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
JsonConfig: write all flags when generating config file
This commit is contained in:
@@ -121,15 +121,11 @@ void ffParseBluetoothJsonObject(FFBluetoothOptions* options, yyjson_val* module)
|
||||
|
||||
void ffGenerateBluetoothJsonConfig(FFBluetoothOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
__attribute__((__cleanup__(ffDestroyBluetoothOptions))) FFBluetoothOptions defaultOptions;
|
||||
ffInitBluetoothOptions(&defaultOptions);
|
||||
ffJsonConfigGenerateModuleArgsConfig(doc, module, &options->moduleArgs);
|
||||
|
||||
ffJsonConfigGenerateModuleArgsConfig(doc, module, &defaultOptions.moduleArgs, &options->moduleArgs);
|
||||
yyjson_mut_obj_add_bool(doc, module, "showDisconnected", options->showDisconnected);
|
||||
|
||||
if (options->showDisconnected != defaultOptions.showDisconnected)
|
||||
yyjson_mut_obj_add_bool(doc, module, "showDisconnected", options->showDisconnected);
|
||||
|
||||
ffPercentGenerateJsonConfig(doc, module, defaultOptions.percent, options->percent);
|
||||
ffPercentGenerateJsonConfig(doc, module, options->percent);
|
||||
}
|
||||
|
||||
void ffGenerateBluetoothJsonResult(FFBluetoothOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
|
||||
Reference in New Issue
Block a user