Browse Source

Fix some zyn issues

tags/1.9.4
falkTX 12 years ago
parent
commit
9d92ac1275
3 changed files with 21 additions and 11 deletions
  1. +1
    -0
      source/backend/native/zynaddsubfx-ui.cpp
  2. +10
    -0
      source/backend/native/zynaddsubfx.cpp
  3. +10
    -11
      source/backend/native/zynaddsubfx/UI/MasterUI.fl

+ 1
- 0
source/backend/native/zynaddsubfx-ui.cpp View File

@@ -17,6 +17,7 @@


#define PIXMAP_PATH "/usr/share/zynaddsubfx/pixmaps/" #define PIXMAP_PATH "/usr/share/zynaddsubfx/pixmaps/"
#define SOURCE_DIR "/usr/share/zynaddsubfx/examples" #define SOURCE_DIR "/usr/share/zynaddsubfx/examples"
#define PLUGINVERSION


// zynaddsubfx ui includes // zynaddsubfx ui includes
#include "zynaddsubfx/UI/NioUI.cpp" #include "zynaddsubfx/UI/NioUI.cpp"


+ 10
- 0
source/backend/native/zynaddsubfx.cpp View File

@@ -290,12 +290,15 @@ protected:


size_t getChunk(void** const data) size_t getChunk(void** const data)
{ {
config.save();
return kMaster->getalldata((char**)data); return kMaster->getalldata((char**)data);
} }


void setChunk(void* const data, const size_t size) void setChunk(void* const data, const size_t size)
{ {
fThread.stopLoadLater();
kMaster->putalldata((char*)data, size); kMaster->putalldata((char*)data, size);
kMaster->applyparameters(true);
} }


// ------------------------------------------------------------------- // -------------------------------------------------------------------
@@ -357,6 +360,13 @@ private:
fChangeProgram = true; fChangeProgram = true;
} }


void stopLoadLater()
{
fChangeProgram = false;
fNextBank = 0;
fNextProgram = 0;
}

void stop() void stop()
{ {
fQuit = true; fQuit = true;


+ 10
- 11
source/backend/native/zynaddsubfx/UI/MasterUI.fl View File

@@ -437,11 +437,10 @@ class MasterUI {open
} { } {
Fl_Window masterwindow { Fl_Window masterwindow {
label zynaddsubfx label zynaddsubfx
callback {\#ifdef PLUGINVERSION
fl_alert("ZynAddSubFX could not be closed this way, because it's a plugin. Please use the host aplication to close it.");
\#else
if ((
\#if USE_NSM
callback {if ((
\#ifdef PLUGINVERSION
1
\#elif USE_NSM
(nsm && nsm->is_active()) (nsm && nsm->is_active())
\#else \#else
0 0
@@ -450,7 +449,7 @@ if ((
config.save(); config.save();
*exitprogram=1; *exitprogram=1;
}; };
\#endif} open
} open
xywh {80 370 390 525} type Double xclass zynaddsubfx visible xywh {80 370 390 525} type Double xclass zynaddsubfx visible
} { } {
Fl_Menu_Bar mastermenu { Fl_Menu_Bar mastermenu {
@@ -1121,14 +1120,14 @@ updatepanel();}
} }
Fl_Window simplemasterwindow { Fl_Window simplemasterwindow {
label ZynAddSubFX label ZynAddSubFX
callback {\#ifdef PLUGINVERSION
fl_alert("ZynAddSubFX could not be closed this way, because it's a plugin. Please use the host aplication to close it.");
\#else
if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) {
callback {\#ifndef PLUGINVERSION
if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL))
\#endif
{
config.save(); config.save();
*exitprogram=1; *exitprogram=1;
}; };
\#endif} open
} open
xywh {283 262 600 335} type Double visible xywh {283 262 600 335} type Double visible
} { } {
Fl_Menu_Bar simplemastermenu { Fl_Menu_Bar simplemastermenu {


Loading…
Cancel
Save