From 1bbb3622e1415d23450e500e093cca0c434c4a21 Mon Sep 17 00:00:00 2001 From: dreamer Date: Wed, 18 Sep 2024 22:16:16 +0200 Subject: [PATCH] set numerical bool --- hvcc/generators/c2dpf/templates/DistrhoPluginInfo.h | 4 ++-- hvcc/generators/types/meta.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hvcc/generators/c2dpf/templates/DistrhoPluginInfo.h b/hvcc/generators/c2dpf/templates/DistrhoPluginInfo.h index 27205ac..16efa07 100644 --- a/hvcc/generators/c2dpf/templates/DistrhoPluginInfo.h +++ b/hvcc/generators/c2dpf/templates/DistrhoPluginInfo.h @@ -22,8 +22,8 @@ #define DISTRHO_PLUGIN_WANT_STATE 0 #define DISTRHO_PLUGIN_WANT_TIMEPOS 1 #define DISTRHO_PLUGIN_WANT_FULL_STATE 0 -#define DISTRHO_PLUGIN_WANT_MIDI_INPUT {{meta.midi_input if meta.midi_input is defined else 0}} -#define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT {{meta.midi_output if meta.midi_output is defined else 0}} +#define DISTRHO_PLUGIN_WANT_MIDI_INPUT {{1 if meta.midi_input is sameas true else 0}} +#define DISTRHO_PLUGIN_WANT_MIDI_OUTPUT {{1 if meta.midi_output is sameas true else 0}} {%- if meta.lv2_info != None %} #define DISTRHO_PLUGIN_LV2_CATEGORY "{{meta.lv2_info}}" {%- endif %} diff --git a/hvcc/generators/types/meta.py b/hvcc/generators/types/meta.py index 5a9372b..38adbc6 100644 --- a/hvcc/generators/types/meta.py +++ b/hvcc/generators/types/meta.py @@ -36,8 +36,8 @@ class DPF(BaseModel): enable_ui: bool = False enable_modgui: bool = False ui_size: Optional[DPFUISize] = None - midi_input: Optional[bool] = None - midi_output: Optional[bool] = None + midi_input: bool = False + midi_output: bool = False port_groups: Optional[DPFPortGroups] = None enumerators: Optional[Dict[str, List[str]]] = None version: Optional[str] = None