Browse Source

Update DPF

tags/1.9.4
falkTX 10 years ago
parent
commit
542193d201
4 changed files with 27 additions and 5 deletions
  1. +6
    -3
      source/modules/dgl/src/Window.cpp
  2. +11
    -0
      source/modules/distrho/src/DistrhoPluginInternal.hpp
  3. +5
    -1
      source/modules/distrho/src/DistrhoPluginLV2.cpp
  4. +5
    -1
      source/modules/distrho/src/DistrhoPluginVST.cpp

+ 6
- 3
source/modules/dgl/src/Window.cpp View File

@@ -188,9 +188,12 @@ public:
xWindow = impl->win;
assert(xWindow != 0);

pid_t pid = getpid();
Atom _nwp = XInternAtom(xDisplay, "_NET_WM_PID", True);
XChangeProperty(xDisplay, xWindow, _nwp, XA_CARDINAL, 32, PropModeReplace, (const unsigned char*)&pid, 1);
if (! fUsingEmbed)
{
pid_t pid = getpid();
Atom _nwp = XInternAtom(xDisplay, "_NET_WM_PID", True);
XChangeProperty(xDisplay, xWindow, _nwp, XA_CARDINAL, 32, PropModeReplace, (const unsigned char*)&pid, 1);
}
#endif

DBG("Success!\n");


+ 11
- 0
source/modules/distrho/src/DistrhoPluginInternal.hpp View File

@@ -258,6 +258,17 @@ public:
#endif

#if DISTRHO_PLUGIN_WANT_STATE
bool wantsStateKey(const char* const key) const noexcept
{
for (uint32_t i=0; i < fData->stateCount; ++i)
{
if (fData->stateKeys[i] == key)
return true;
}

return false;
}

uint32_t getStateCount() const noexcept
{
return fData != nullptr ? fData->stateCount : 0;


+ 5
- 1
source/modules/distrho/src/DistrhoPluginLV2.cpp View File

@@ -644,6 +644,10 @@ private:
{
fPlugin.setState(key, newValue);

// check if we want to save this key
if (! fPlugin.wantsStateKey(key))
return;

// check if key already exists
for (auto it = fStateMap.begin(), end = fStateMap.end(); it != end; ++it)
{
@@ -656,7 +660,7 @@ private:
}
}

// add a new one then
// nope, add a new one then
d_string d_key(key);
fStateMap[d_key] = newValue;
}


+ 5
- 1
source/modules/distrho/src/DistrhoPluginVST.cpp View File

@@ -752,6 +752,10 @@ private:
{
fPlugin.setState(newKey, newValue);

// check if we want to save this key
if (! fPlugin.wantsStateKey(key))
return;

// check if key already exists
for (auto it = fStateMap.begin(), end = fStateMap.end(); it != end; ++it)
{
@@ -764,7 +768,7 @@ private:
}
}

// add a new one then
// nope, add a new one then
d_string d_key(newKey);
fStateMap[d_key] = newValue;
}


Loading…
Cancel
Save