Browse Source

Update to latest DPF state API

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 3 years ago
parent
commit
145149bd21
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 14 additions and 22 deletions
  1. +1
    -1
      dpf
  2. +13
    -21
      src/CardinalPlugin.cpp

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit 4ebd02b0ee1a019d46bcd065e21dc68f8af80031
Subproject commit bc57421bf76caab1581ded21d0b0aa66543c21bf

+ 13
- 21
src/CardinalPlugin.cpp View File

@@ -715,38 +715,30 @@ protected:
#endif
}
void initState(const uint32_t index, String& stateKey, String& defaultStateValue) override
void initState(const uint32_t index, State& state) override
{
defaultStateValue = "";
switch (index)
{
case 0:
stateKey = "patch";
state.hints = kStateIsBase64Blob | kStateIsOnlyForDSP;
state.key = "patch";
state.label = "Patch";
break;
case 1:
stateKey = "screenshot";
state.hints = kStateIsHostReadable | kStateIsBase64Blob;
state.key = "screenshot";
state.label = "Screenshot";
break;
case 2:
stateKey = "comment";
state.hints = kStateIsHostWritable;
state.key = "comment";
state.label = "Comment";
break;
#ifndef HEADLESS
case 3:
stateKey = "windowSize";
state.hints = kStateIsOnlyForUI;
state.key = "windowSize";
state.label = "Window size";
break;
#endif
}
}
uint32_t getStateHints(const uint32_t index) override
{
switch (index)
{
case 1: // screenshot
case 2: // comment
return kStateIsHostVisible;
default:
return 0x0;
}
}


Loading…
Cancel
Save