diff options
Diffstat (limited to 'lib/python/qmk')
-rwxr-xr-x | lib/python/qmk/cli/generate/config_h.py | 2 | ||||
-rw-r--r-- | lib/python/qmk/info.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index 00fb1d9585..fc681300a3 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -108,6 +108,8 @@ def generate_config_items(kb_info_json, config_h_lines): elif key_type.startswith('array'): config_h_lines.append(generate_define(config_key, f'{{ {", ".join(map(str, config_value))} }}')) elif key_type == 'bool': + config_h_lines.append(generate_define(config_key, 'true' if config_value else 'false')) + elif key_type == 'flag': if config_value: config_h_lines.append(generate_define(config_key)) elif key_type == 'mapping': diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index e960bf20ee..5500ecdd19 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -513,7 +513,7 @@ def _config_to_json(key_type, config_value): else: return list(map(str.strip, config_value.split(','))) - elif key_type == 'bool': + elif key_type in ['bool', 'flag']: if isinstance(config_value, bool): return config_value return config_value in true_values |