Browse Source

Set ENGINE_OPTION_FRONTEND_WIN_ID for UI

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.0
falkTX 3 years ago
parent
commit
2a3fb786b9
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      plugins/Common/IldaeilUI.cpp

+ 7
- 1
plugins/Common/IldaeilUI.cpp View File

@@ -176,7 +176,10 @@ public:


const CarlaHostHandle handle = fPlugin->fCarlaHostHandle; const CarlaHostHandle handle = fPlugin->fCarlaHostHandle;


// carla_set_engine_option(handle, ENGINE_OPTION_FRONTEND_WIN_ID, 0, winIdStr);

char winIdStr[24];
std::snprintf(winIdStr, sizeof(winIdStr), "%lx", (ulong)getWindow().getNativeWindowHandle());
carla_set_engine_option(handle, ENGINE_OPTION_FRONTEND_WIN_ID, 0, winIdStr);
carla_set_engine_option(handle, ENGINE_OPTION_FRONTEND_UI_SCALE, getScaleFactor()*1000, nullptr); carla_set_engine_option(handle, ENGINE_OPTION_FRONTEND_UI_SCALE, getScaleFactor()*1000, nullptr);


if (carla_get_current_plugin_count(handle) != 0) if (carla_get_current_plugin_count(handle) != 0)
@@ -190,6 +193,9 @@ public:


~IldaeilUI() override ~IldaeilUI() override
{ {
if (fPlugin != nullptr && fPlugin->fCarlaHostHandle != nullptr)
carla_set_engine_option(fPlugin->fCarlaHostHandle, ENGINE_OPTION_FRONTEND_WIN_ID, 0, "0");

if (isThreadRunning()) if (isThreadRunning())
stopThread(-1); stopThread(-1);




Loading…
Cancel
Save