From 4154b61f95f45ed8780e6f08b43e08f8c7577075 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 7 Feb 2021 23:54:48 +0000 Subject: [PATCH] Reduce excessive prints Signed-off-by: falkTX --- source/backend/engine/CarlaEngineNative.cpp | 18 ++++++++++++++++-- source/modules/water/files/File.cpp | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/source/backend/engine/CarlaEngineNative.cpp b/source/backend/engine/CarlaEngineNative.cpp index 03ed7f29b..8ca275a82 100644 --- a/source/backend/engine/CarlaEngineNative.cpp +++ b/source/backend/engine/CarlaEngineNative.cpp @@ -347,10 +347,24 @@ public: fParameters[rindex] = valuef; if (fUiServer.isPipeRunning()) + { pHost->ui_parameter_changed(pHost->handle, rindex, valuef); + } else - carla_stdout("Plugin with id %d triggered parameter %d update while UI is hidden", - pluginId, value1); + { + static uint last_pluginId = pluginId; + static int last_value1 = value1; + static bool init = true; + + if (init || last_pluginId != pluginId || last_value1 != value1) + { + init = false; + last_pluginId = pluginId; + last_value1 = value1; + carla_stdout("Plugin with id %d triggered parameter %d update while UI is hidden", + pluginId, value1); + } + } } } break; diff --git a/source/modules/water/files/File.cpp b/source/modules/water/files/File.cpp index 22a9dc1d7..25babbfba 100644 --- a/source/modules/water/files/File.cpp +++ b/source/modules/water/files/File.cpp @@ -1111,7 +1111,7 @@ File File::getCurrentWorkingDirectory() bool File::setAsCurrentWorkingDirectory() const { - return SetCurrentDirectory (getFullPathName().toWideCharPointer()) != FALSE; + return SetCurrentDirectory (getFullPathName().toUTF8()) != FALSE; } bool File::isSymbolicLink() const