Browse Source

Fix X parameter range; Fix UI crash on close if never idle

Signed-off-by: falkTX <falktx@falktx.com>
master
falkTX 3 years ago
parent
commit
0373b2bc13
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 11 additions and 4 deletions
  1. +1
    -1
      dpf
  2. +2
    -2
      plugins/glBars/DistrhoPluginGLBars.cpp
  3. +7
    -1
      plugins/glBars/DistrhoUIGLBars.cpp
  4. +1
    -0
      plugins/glBars/DistrhoUIGLBars.hpp

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit ccece16081c89ead759394994f7251092938837e
Subproject commit e44a908375610d7f46b507532b4602c9f89f085a

+ 2
- 2
plugins/glBars/DistrhoPluginGLBars.cpp View File

@@ -74,8 +74,8 @@ void DistrhoPluginGLBars::initParameter(uint32_t index, Parameter& parameter)
parameter.name = "X";
parameter.symbol = "x";
parameter.unit = "";
parameter.ranges.def = -4.0f;
parameter.ranges.min = 0.0f;
parameter.ranges.def = 0.0f;
parameter.ranges.min = -4.0f;
parameter.ranges.max = 4.0f;
break;


+ 7
- 1
plugins/glBars/DistrhoUIGLBars.cpp View File

@@ -26,13 +26,17 @@ START_NAMESPACE_DISTRHO
// -----------------------------------------------------------------------

DistrhoUIGLBars::DistrhoUIGLBars()
: UI(512, 512)
: UI(512, 512),
fInitialized(false)
{
setGeometryConstraints(256, 256, true);
}

DistrhoUIGLBars::~DistrhoUIGLBars()
{
if (! fInitialized)
return;

if (DistrhoPluginGLBars* const dspPtr = (DistrhoPluginGLBars*)getPluginInstancePointer())
{
const MutexLocker csm(dspPtr->fMutex);
@@ -81,6 +85,8 @@ void DistrhoUIGLBars::uiIdle()
if (dspPtr->fState != nullptr)
return;

fInitialized = true;

const MutexLocker csm(dspPtr->fMutex);
dspPtr->fState = &fState;
}


+ 1
- 0
plugins/glBars/DistrhoUIGLBars.hpp View File

@@ -53,6 +53,7 @@ protected:
bool onKeyboard(const KeyboardEvent&) override;

private:
bool fInitialized;
glBarsState fState;

DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(DistrhoUIGLBars)


Loading…
Cancel
Save