Fix LV2 boolean Atom values size #8558

As per lv2/atom.lv2/atom.h
LV2_Atom_Bool is-a LV2_Atom_Int, which uses int32_t
This commit is contained in:
Robin Gareus 2021-02-02 22:41:43 +01:00
parent 4f87d59576
commit b50a6fbe17
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 8 additions and 8 deletions

View File

@ -188,10 +188,10 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee
_ui_scale_factor = s;
}
static void set_global_ui_style_boxy (bool yn) {
_ui_style_boxy = yn;
_ui_style_boxy = yn ? 1 : 0;
}
static void set_global_ui_style_flat (bool yn) {
_ui_style_flat = yn;
_ui_style_flat = yn ? 1 : 0;
}
static void set_main_window_id (unsigned long id) {
_ui_transient_win_id = id;
@ -343,8 +343,8 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee
// Options passed to plugin
int32_t _seq_size;
static bool _ui_style_flat;
static bool _ui_style_boxy;
static int32_t _ui_style_flat;
static int32_t _ui_style_boxy;
static uint32_t _ui_background_color;
static uint32_t _ui_foreground_color;
static uint32_t _ui_contrasting_color;

View File

@ -129,8 +129,8 @@ using namespace ARDOUR;
using namespace PBD;
bool LV2Plugin::force_state_save = false;
bool LV2Plugin::_ui_style_flat = false;
bool LV2Plugin::_ui_style_boxy = false;
int32_t LV2Plugin::_ui_style_flat = 0;
int32_t LV2Plugin::_ui_style_boxy = 0;
uint32_t LV2Plugin::_ui_background_color = 0x000000ff; // RGBA
uint32_t LV2Plugin::_ui_foreground_color = 0xffffffff; // RGBA
uint32_t LV2Plugin::_ui_contrasting_color = 0x33ff33ff; // RGBA
@ -577,9 +577,9 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
{ LV2_OPTIONS_INSTANCE, 0, _uri_map.uri_to_id("http://lv2plug.in/ns/extensions/ui#scaleFactor"),
sizeof(float), atom_Float, &_ui_scale_factor },
{ LV2_OPTIONS_INSTANCE, 0, _uri_map.uri_to_id("http://ardour.org/lv2/theme/#styleBoxy"),
sizeof(bool), atom_Bool, &_ui_style_boxy },
sizeof(int32_t), atom_Bool, &_ui_style_boxy },
{ LV2_OPTIONS_INSTANCE, 0, _uri_map.uri_to_id("http://ardour.org/lv2/theme/#styleFlat"),
sizeof(bool), atom_Bool, &_ui_style_flat },
sizeof(int32_t), atom_Bool, &_ui_style_flat },
{ LV2_OPTIONS_INSTANCE, 0, _uri_map.uri_to_id("http://kxstudio.sf.net/ns/lv2ext/props#TransientWindowId"),
sizeof(int32_t), atom_Long, &_ui_transient_win_id },
{ LV2_OPTIONS_INSTANCE, 0, 0, 0, 0, NULL }