Update to latest DPF state API

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-02-11 04:44:30 +00:00
parent d672a75228
commit 145149bd21
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
2 changed files with 14 additions and 22 deletions

2
dpf

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

View file

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