zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 2506292a78c9654280d628d88acf36c5657fde11
parent fb7453966079bf419a89a8436344b4438fa163fd
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Sun,  2 Oct 2016 15:51:16 -0400

Add /quit

Diffstat:
Msrc/Misc/MiddleWare.cpp | 4+++-
Msrc/UI/guimain.cpp | 2+-
Msrc/main.cpp | 2+-
3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/Misc/MiddleWare.cpp b/src/Misc/MiddleWare.cpp @@ -57,6 +57,7 @@ #endif using std::string; +int Pexitprogram = 0; /****************************************************************************** * LIBLO And Reflection Code * @@ -1419,7 +1420,8 @@ static rtosc::Ports middwareSnoopPorts = { midi.unMap(addr.c_str(), true); rEnd}, //drop this message into the abyss - {"ui/title:", 0, 0, [](const char *msg, RtData &d) {}} + {"ui/title:", 0, 0, [](const char *msg, RtData &d) {}}, + {"quit:", 0, 0, [](const char *, RtData&) {Pexitprogram = 1;}}, }; static rtosc::Ports middlewareReplyPorts = { diff --git a/src/UI/guimain.cpp b/src/UI/guimain.cpp @@ -46,7 +46,7 @@ bool fileexists(const char *filename) return false; } -int Pexitprogram = 0; +extern int Pexitprogram; #include "Connection.h" diff --git a/src/main.cpp b/src/main.cpp @@ -56,7 +56,7 @@ using namespace std; Master *master; int swaplr = 0; //1 for left-right swapping -int Pexitprogram = 0; //if the UI set this to 1, the program will exit +extern int Pexitprogram; //if the UI set this to 1, the program will exit #if LASH #include "Misc/LASHClient.h"