Consistency in /sw/last/current replies
This commit is contained in:
parent
d03495d568
commit
d729ba66e6
2 changed files with 6 additions and 3 deletions
|
|
@ -554,6 +554,9 @@ void Editor::Impl::uiReceiveMessage(const char* path, const char* sig, const sfi
|
|||
else if (Messages::matchOSC("/sw/last/current", path, indices) && !strcmp(sig, "i")) {
|
||||
updateSWLastCurrent(args[0].i);
|
||||
}
|
||||
else if (Messages::matchOSC("/sw/last/current", path, indices) && !strcmp(sig, "N")) {
|
||||
updateSWLastCurrent(-1);
|
||||
}
|
||||
else if (Messages::matchOSC("/sw/last/&/label", path, indices) && !strcmp(sig, "s")) {
|
||||
updateSWLastLabel(indices[0], args[0].s);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,10 +87,10 @@ void sfz::Synth::dispatchMessage(Client& client, int delay, const char* path, co
|
|||
} break;
|
||||
|
||||
MATCH("/sw/last/current", "") {
|
||||
int32_t value = -1;
|
||||
if (impl.currentSwitch_)
|
||||
value = *impl.currentSwitch_;
|
||||
client.receive<'i'>(delay, path, value);
|
||||
client.receive<'i'>(delay, path, *impl.currentSwitch_);
|
||||
else
|
||||
client.receive<'N'>(delay, path, {});
|
||||
} break;
|
||||
|
||||
MATCH("/sw/last/&/label", "") {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue