lsp-plugins / lsp-plugins

Linux Studio Plugins Project
https://lsp-plug.in/
GNU Lesser General Public License v3.0
556 stars 48 forks source link

fUIScaleFactor does not get initialized if host does not support LV2_UI__scaleFactor. #283

Closed Stazed closed 1 year ago

Stazed commented 1 year ago

In file: lsp-plugins/modules/lsp-plugin-fw/include/lsp-plug.in/plug-fw/wrap/lv2/extensions.h

struct Extensions: --- line 202 is defined but not initialized.

float fUIScaleFactor; // UI scale factor

--- line 413 is the only place that it gets initialized, but only if the host supports it.

else if (opts->key == uridScaleFactor) { float scale = read_option_float(opts, uridScaleFactor, 1.0f); if (scale > 0.0f) fUIScaleFactor = scale; lsp_trace("UIScaleFactor has been set to %f", fUIScaleFactor); }

Adding to initializer around line 225 fixes it. Extensions()

fUIScaleFactor = 1.0f; // line 225

The uninitialized is causing this issue with qtractor, and same with a host that I am working on. https://www.rncbc.org/drupal/node/2393

sadko4u commented 1 year ago

Hello! Thank you for your report. Will fix in the upcoming release.

sadko4u commented 1 year ago

Refactored the structure, will be available in 1.2.4: https://github.com/lsp-plugins/lsp-plugin-fw/commit/15635e07243ae3536c09d16fe5322c077147b23d

sadko4u commented 1 year ago

Available in 1.2.4!