| @@ -71,7 +71,9 @@ BASE_FLAGS += -Wmissing-declarations -Wsign-conversion | |||||
| endif | endif | ||||
| endif | endif | ||||
| ifneq ($(WIN32),true) | |||||
| ifeq ($(WIN32),true) | |||||
| BASE_FLAGS += -msse -msse2 | |||||
| else | |||||
| BASE_FLAGS += -fPIC -DPIC | BASE_FLAGS += -fPIC -DPIC | ||||
| endif | endif | ||||
| @@ -213,7 +213,8 @@ struct RewireBridge { | |||||
| return -1; | return -1; | ||||
| #define JOIN(a, b) a ## b | #define JOIN(a, b) a ## b | ||||
| #define LIB_SYMBOL(NAME) NAME = (Fn_##NAME)lib_symbol(lib, #NAME); if (NAME == nullptr) cleanup(); return -2; | |||||
| #define LIB_SYMBOL(NAME) NAME = (Fn_##NAME)lib_symbol(lib, #NAME); | |||||
| //if (NAME == nullptr) cleanup(); return -2; | |||||
| LIB_SYMBOL(RWDEFCloseDevice) | LIB_SYMBOL(RWDEFCloseDevice) | ||||
| LIB_SYMBOL(RWDEFDriveAudio) | LIB_SYMBOL(RWDEFDriveAudio) | ||||
| @@ -473,11 +474,24 @@ public: | |||||
| void idle() override | void idle() override | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr,); | |||||
| fRw.RWDEFIdle(); | |||||
| // check if panel has been closed | // check if panel has been closed | ||||
| if (fIsPanelLaunched && ! fRw.RWDEFIsPanelAppLaunched()) | if (fIsPanelLaunched && ! fRw.RWDEFIsPanelAppLaunched()) | ||||
| { | { | ||||
| fIsPanelLaunched = true; | |||||
| pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); | |||||
| // FIXME | |||||
| //fIsPanelLaunched = true; | |||||
| //pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); | |||||
| // static int counter = 0; | |||||
| // | |||||
| // if (counter % 1000) | |||||
| // { | |||||
| // carla_stdout("Panel is closed?"); | |||||
| // } | |||||
| // | |||||
| // ++counter; | |||||
| } | } | ||||
| CarlaPlugin::idle(); | CarlaPlugin::idle(); | ||||
| @@ -1716,7 +1716,7 @@ protected: | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, 0); | CARLA_SAFE_ASSERT_RETURN(fEffect != nullptr, 0); | ||||
| #ifdef DEBUG | #ifdef DEBUG | ||||
| if (opcode != effEditIdle && opcode != effProcessEvents) | |||||
| if (opcode != effIdle && opcode != effEditIdle && opcode != effProcessEvents) | |||||
| carla_debug("VstPlugin::dispatcher(%02i:%s, %i, " P_INTPTR ", %p, %f)", opcode, vstEffectOpcode2str(opcode), index, value, ptr, opt); | carla_debug("VstPlugin::dispatcher(%02i:%s, %i, " P_INTPTR ", %p, %f)", opcode, vstEffectOpcode2str(opcode), index, value, ptr, opt); | ||||
| #endif | #endif | ||||
| @@ -35,6 +35,7 @@ | |||||
| // ------------------------------------------------------------------------- | // ------------------------------------------------------------------------- | ||||
| static bool gIsInitiated = false; | |||||
| static volatile bool gCloseNow = false; | static volatile bool gCloseNow = false; | ||||
| static volatile bool gSaveNow = false; | static volatile bool gSaveNow = false; | ||||
| @@ -161,8 +162,8 @@ public: | |||||
| //if (! File::isAbsolutePath((const char*)fProjFileName)) | //if (! File::isAbsolutePath((const char*)fProjFileName)) | ||||
| // fProjFileName = File::getCurrentWorkingDirectory().getChildFile((const char*)fProjFileName).getFullPathName().toRawUTF8(); | // fProjFileName = File::getCurrentWorkingDirectory().getChildFile((const char*)fProjFileName).getFullPathName().toRawUTF8(); | ||||
| if (! fPlugin->loadStateFromFile(fProjFileName)) | |||||
| carla_stderr("Plugin preset load failed, error was:\n%s", fEngine->getLastError()); | |||||
| //if (! fPlugin->loadStateFromFile(fProjFileName)) | |||||
| // carla_stderr("Plugin preset load failed, error was:\n%s", fEngine->getLastError()); | |||||
| } | } | ||||
| } | } | ||||
| @@ -325,7 +326,7 @@ protected: | |||||
| case ENGINE_CALLBACK_UI_STATE_CHANGED: | case ENGINE_CALLBACK_UI_STATE_CHANGED: | ||||
| if (! isOscControlRegistered()) | if (! isOscControlRegistered()) | ||||
| { | { | ||||
| if (value1 != 1) | |||||
| if (value1 != 1 && gIsInitiated) | |||||
| gCloseNow = true; | gCloseNow = true; | ||||
| } | } | ||||
| else | else | ||||
| @@ -605,6 +606,7 @@ int main(int argc, char* argv[]) | |||||
| } | } | ||||
| client.ready(!useOsc); | client.ready(!useOsc); | ||||
| gIsInitiated = true; | |||||
| client.exec(); | client.exec(); | ||||
| carla_set_engine_about_to_close(); | carla_set_engine_about_to_close(); | ||||