Browse Source

Try to use complete UI if running as plugin bridge; Misc changes

Closes #445
tags/1.9.7
falkTX 7 years ago
parent
commit
39a92a8cdd
3 changed files with 13 additions and 13 deletions
  1. +0
    -3
      data/windows/create-wineprefixes.sh
  2. +12
    -8
      source/backend/plugin/CarlaPluginLV2.cpp
  3. +1
    -2
      source/native-plugins/zynaddsubfx/Misc/MiddleWare.cpp

+ 0
- 3
data/windows/create-wineprefixes.sh View File

@@ -7,7 +7,6 @@ rm -rf ~/.winepy3_x64
export WINEARCH=win32 export WINEARCH=win32
export WINEPREFIX=~/.winepy3_x86 export WINEPREFIX=~/.winepy3_x86
wineboot wineboot
regsvr32 wineasio.dll
winetricks vcrun2010 winetricks vcrun2010
winetricks corefonts winetricks corefonts
winetricks fontsmooth=rgb winetricks fontsmooth=rgb
@@ -21,8 +20,6 @@ winetricks fontsmooth=rgb
export WINEARCH=win64 export WINEARCH=win64
export WINEPREFIX=~/.winepy3_x64 export WINEPREFIX=~/.winepy3_x64
wineboot wineboot
regsvr32 wineasio.dll
wine64 regsvr32 wineasio.dll
winetricks vcrun2010 winetricks vcrun2010
winetricks corefonts winetricks corefonts
winetricks fontsmooth=rgb winetricks fontsmooth=rgb


+ 12
- 8
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -5083,13 +5083,12 @@ public:
int eQt4, eQt5, eGtk2, eGtk3, eCocoa, eWindows, eX11, eExt, eMod, iCocoa, iWindows, iX11, iExt, iFinal; int eQt4, eQt5, eGtk2, eGtk3, eCocoa, eWindows, eX11, eExt, eMod, iCocoa, iWindows, iX11, iExt, iFinal;
eQt4 = eQt5 = eGtk2 = eGtk3 = eCocoa = eWindows = eX11 = eExt = eMod = iCocoa = iWindows = iX11 = iExt = iFinal = -1; eQt4 = eQt5 = eGtk2 = eGtk3 = eCocoa = eWindows = eX11 = eExt = eMod = iCocoa = iWindows = iX11 = iExt = iFinal = -1;


#if defined(BUILD_BRIDGE)
const bool preferUiBridges(false);
#elif defined(LV2_UIS_ONLY_BRIDGES)
#if defined(BUILD_BRIDGE) || defined(LV2_UIS_ONLY_BRIDGES)
const bool preferUiBridges(true); const bool preferUiBridges(true);
#else #else
const bool preferUiBridges(pData->engine->getOptions().preferUiBridges && (pData->hints & PLUGIN_IS_BRIDGE) == 0); const bool preferUiBridges(pData->engine->getOptions().preferUiBridges && (pData->hints & PLUGIN_IS_BRIDGE) == 0);
#endif #endif
bool hasShowInterface = false;


for (uint32_t i=0; i < fRdfDescriptor->UICount; ++i) for (uint32_t i=0; i < fRdfDescriptor->UICount; ++i)
{ {
@@ -5183,11 +5182,11 @@ public:
else if (iExt >= 0) else if (iExt >= 0)
iFinal = iExt; iFinal = iExt;


#ifndef BUILD_BRIDGE
if (iFinal < 0) if (iFinal < 0)
#endif
{ {
// no suitable UI found, see if there's one which supports ui:showInterface // no suitable UI found, see if there's one which supports ui:showInterface
bool hasShowInterface = false;

for (uint32_t i=0; i < fRdfDescriptor->UICount && ! hasShowInterface; ++i) for (uint32_t i=0; i < fRdfDescriptor->UICount && ! hasShowInterface; ++i)
{ {
LV2_RDF_UI* const ui(&fRdfDescriptor->UIs[i]); LV2_RDF_UI* const ui(&fRdfDescriptor->UIs[i]);
@@ -5205,7 +5204,7 @@ public:
} }
} }


if (! hasShowInterface)
if (iFinal < 0)
{ {
if (eMod < 0) if (eMod < 0)
{ {
@@ -5256,8 +5255,13 @@ public:


const LV2_Property uiType(fUI.rdfDescriptor->Type); const LV2_Property uiType(fUI.rdfDescriptor->Type);


if (iFinal == eQt4 || iFinal == eQt5 || iFinal == eGtk2 || iFinal == eGtk3 ||
iFinal == eCocoa || iFinal == eWindows || iFinal == eX11 || iFinal == eExt || iFinal == eMod)
if (
(iFinal == eQt4 || iFinal == eQt5 || iFinal == eGtk2 || iFinal == eGtk3 ||
iFinal == eCocoa || iFinal == eWindows || iFinal == eX11 || iFinal == eExt || iFinal == eMod)
#ifdef BUILD_BRIDGE
&& preferUiBridges && ! hasShowInterface
#endif
)
{ {
// ----------------------------------------------------------- // -----------------------------------------------------------
// initialize ui-bridge // initialize ui-bridge


+ 1
- 2
source/native-plugins/zynaddsubfx/Misc/MiddleWare.cpp View File

@@ -886,7 +886,6 @@ static std::vector<std::string> getFiles(const char *folder, bool finddir)
#else #else
std::string darn_windows = folder + std::string("/") + std::string(fn->d_name); std::string darn_windows = folder + std::string("/") + std::string(fn->d_name);
printf("attr on <%s> => %x\n", darn_windows.c_str(), GetFileAttributes(darn_windows.c_str())); printf("attr on <%s> => %x\n", darn_windows.c_str(), GetFileAttributes(darn_windows.c_str()));
printf("desired mask = %x\n", mask);
printf("error = %x\n", INVALID_FILE_ATTRIBUTES); printf("error = %x\n", INVALID_FILE_ATTRIBUTES);
bool is_dir = GetFileAttributes(darn_windows.c_str()) & FILE_ATTRIBUTE_DIRECTORY; bool is_dir = GetFileAttributes(darn_windows.c_str()) & FILE_ATTRIBUTE_DIRECTORY;
#endif #endif
@@ -1648,7 +1647,7 @@ void CarlaMiddleWareImpl::heartBeat(Master *master)
//Last provided beat //Last provided beat
//Last acknowledged beat //Last acknowledged beat
//Current offline status //Current offline status
struct timespec time; struct timespec time;
clock_gettime(CLOCK_MONOTONIC, &time); clock_gettime(CLOCK_MONOTONIC, &time);
uint32_t now = (time.tv_sec-start_time_sec)*100 + uint32_t now = (time.tv_sec-start_time_sec)*100 +


Loading…
Cancel
Save