commit 7f45300366ee3c101cd6986f833ac7f32b42051a
parent 4f11f8cc49b24ede1735a16606e7bad5a52ab41d
Author: falkTX <falktx@falktx.com>
Date: Fri, 29 Sep 2023 19:29:06 +0200
Fix last commit, also fix non-english locales for clap
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/distrho/src/DistrhoPluginCLAP.cpp b/distrho/src/DistrhoPluginCLAP.cpp
@@ -1214,9 +1214,14 @@ public:
}
if (isInteger)
+ {
*value = std::atoi(display);
+ }
else
+ {
+ const ScopedSafeLocale ssl;
*value = std::atof(display);
+ }
return true;
}
@@ -1673,9 +1678,14 @@ public:
continue;
if (fPlugin.getParameterHints(j) & kParameterIsInteger)
+ {
fvalue = std::atoi(value.buffer());
+ }
else
+ {
+ const ScopedSafeLocale ssl;
fvalue = std::atof(value.buffer());
+ }
fCachedParameters.values[j] = fvalue;
#if DISTRHO_PLUGIN_HAS_UI
diff --git a/distrho/src/DistrhoPluginVST3.cpp b/distrho/src/DistrhoPluginVST3.cpp
@@ -962,6 +962,7 @@ public:
if (read == 0)
return empty ? V3_INVALID_ARG : V3_OK;
+ empty = false;
for (int32_t i = 0; i < read; ++i)
{
// found terminator, stop here