Skip to content

Commit

Permalink
Reconnect/Disconnect MTS verbiage (#7111)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkruselj authored Jul 23, 2023
1 parent 8a8ebbe commit 448b4ef
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/surge-xt/gui/SurgeGUIEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3674,25 +3674,23 @@ juce::PopupMenu SurgeGUIEditor::makeTuningMenu(const juce::Point<int> &where, bo
if (tsMode && !this->synth->storage.oddsound_mts_client &&
!getStorage()->oddsound_mts_active_as_main)
{
tuningSubMenu.addItem(
Surge::GUI::toOSCase("Reconnect Instance as MTS-ESP Client"), [this]() {
this->synth->storage.initialize_oddsound();
this->synth->refresh_editor = true;
this->synth->storage.getPatch().dawExtraState.disconnectFromOddSoundMTS = false;
});
tuningSubMenu.addItem(Surge::GUI::toOSCase("Connect Instance to MTS-ESP"), [this]() {
this->synth->storage.initialize_oddsound();
this->synth->refresh_editor = true;
this->synth->storage.getPatch().dawExtraState.disconnectFromOddSoundMTS = false;
});
}

if (this->synth->storage.oddsound_mts_active_as_client &&
this->synth->storage.oddsound_mts_client)
{
tuningSubMenu.addItem(
Surge::GUI::toOSCase("Disconnect Instance as MTS-ESP Client"), [this]() {
auto q = this->synth->storage.oddsound_mts_client;
this->synth->storage.oddsound_mts_active_as_client = false;
this->synth->storage.oddsound_mts_client = nullptr;
this->synth->storage.getPatch().dawExtraState.disconnectFromOddSoundMTS = true;
MTS_DeregisterClient(q);
});
tuningSubMenu.addItem(Surge::GUI::toOSCase("Disconnect Instance from MTS-ESP"), [this]() {
auto q = this->synth->storage.oddsound_mts_client;
this->synth->storage.oddsound_mts_active_as_client = false;
this->synth->storage.oddsound_mts_client = nullptr;
this->synth->storage.getPatch().dawExtraState.disconnectFromOddSoundMTS = true;
MTS_DeregisterClient(q);
});

tuningSubMenu.addSeparator();

Expand Down

0 comments on commit 448b4ef

Please sign in to comment.