Browse Source

Some fixes for windows

Signed-off-by: falkTX <falktx@gmail.com>
tags/v2.1-alpha1-winvst
parent
commit
a29d15fc52
3 changed files with 10 additions and 1 deletions
  1. +1
    -1
      source/backend/plugin/CarlaPluginJuce.cpp
  2. +2
    -0
      source/bridges-plugin/CarlaBridgePlugin.cpp
  3. +7
    -0
      source/utils/JucePluginWindow.hpp

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

@@ -1232,7 +1232,7 @@ public:
else
pData->name = pData->engine->getUniquePluginName(fInstance->getName().toRawUTF8());

if (filename != nullptr && pData->filename[0] != '\0')
if (filename != nullptr && filename[0] != '\0')
pData->filename = carla_strdup(filename);

// ---------------------------------------------------------------


+ 2
- 0
source/bridges-plugin/CarlaBridgePlugin.cpp View File

@@ -251,8 +251,10 @@ public:
gIsInitiated = true;

#if defined(USING_JUCE) && (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
# ifndef CARLA_OS_WIN
static const int argc = 0;
static const char* argv[] = {};
# endif
juce::JUCEApplicationBase::createInstance = &juce_CreateApplication;
juce::JUCEApplicationBase::main(JUCE_MAIN_FUNCTION_ARGS);
#else


+ 7
- 0
source/utils/JucePluginWindow.hpp View File

@@ -125,6 +125,13 @@ private:
[parentWindow addChildWindow:window
ordered:NSWindowAbove];
#endif

#if JUCE_WINDOWS
const HWND window = (HWND)getWindowHandle();
CARLA_SAFE_ASSERT_RETURN(window != nullptr,);

SetWindowLongPtr(window, GWLP_HWNDPARENT, static_cast<LONG_PTR>(fTransientId));
#endif
}

CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(JucePluginWindow)


Loading…
Cancel
Save