Browse Source

Revert "Set custom UI scale for VST2 and Juce plugins"

This reverts commit 01b345f072.
tags/v2.1
falkTX 5 years ago
parent
commit
9f7f18fbcf
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 10 additions and 30 deletions
  1. +1
    -3
      source/backend/plugin/CarlaPluginJuce.cpp
  2. +3
    -7
      source/backend/plugin/CarlaPluginVST2.cpp
  3. +4
    -11
      source/includes/vestige/vestige.h
  4. +2
    -9
      source/utils/JucePluginWindow.hpp

+ 1
- 3
source/backend/plugin/CarlaPluginJuce.cpp View File

@@ -389,12 +389,10 @@ public:
{
if (fWindow == nullptr)
{
const EngineOptions& opts(pData->engine->getOptions());

juce::String uiName(pData->name);
uiName += " (GUI)";

fWindow = new JucePluginWindow(opts.frontendWinId, opts.uiScale);
fWindow = new JucePluginWindow(pData->engine->getOptions().frontendWinId);
fWindow->setName(uiName);
}



+ 3
- 7
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -40,6 +40,9 @@
#undef VST_FORCE_DEPRECATED
#define VST_FORCE_DEPRECATED 0

#undef kEffectMagic
#define kEffectMagic (CCONST( 'V', 's', 't', 'P' ))

using water::ByteOrder;

CARLA_BACKEND_START_NAMESPACE
@@ -527,13 +530,6 @@ public:
{
fUI.isOpen = true;

// pass ui scale to plugin
dispatcher(effVendorSpecific,
CCONST('P', 'r', 'e', 'S'),
CCONST('A', 'e', 'C', 's'),
nullptr,
pData->engine->getOptions().uiScale);

ERect* vstRect = nullptr;
dispatcher(effEditGetRect, 0, 0, &vstRect);



+ 4
- 11
source/includes/vestige/vestige.h View File

@@ -38,17 +38,10 @@
# define __cdecl
#endif

#ifdef WORDS_BIGENDIAN
#define CCONST(a, b, c, d) ( ( ( (int) a ) << 0 ) | \
( ( (int) b ) << 8 ) | \
( ( (int) c ) << 16 ) | \
( ( (int) d ) << 24 ) )
#else
#define CCONST(a, b, c, d) ( ( ( (int) a ) << 24 ) | \
( ( (int) b ) << 16 ) | \
( ( (int) c ) << 8 ) | \
( ( (int) d ) << 0 ) )
#endif
#define CCONST(a, b, c, d)( ( ( (int) a ) << 24 ) | \
( ( (int) b ) << 16 ) | \
( ( (int) c ) << 8 ) | \
( ( (int) d ) << 0 ) )

#define audioMasterAutomate 0
#define audioMasterVersion 1


+ 2
- 9
source/utils/JucePluginWindow.hpp View File

@@ -36,11 +36,10 @@ namespace juce {
class JucePluginWindow : public DialogWindow
{
public:
JucePluginWindow(const uintptr_t parentId, const float scale)
JucePluginWindow(const uintptr_t parentId)
: DialogWindow("JucePluginWindow", Colour(50, 50, 200), true, false),
fClosed(false),
fTransientId(parentId),
fScale(scale)
fTransientId(parentId)
{
setVisible(false);
//setAlwaysOnTop(true);
@@ -90,15 +89,9 @@ protected:
return true;
}

float getDesktopScaleFactor() const override
{
return fScale;
}

private:
volatile bool fClosed;
const uintptr_t fTransientId;
float fScale;

void setTransient()
{


Loading…
Cancel
Save