Browse Source

Fix last commit, also fix non-english locales for clap

Signed-off-by: falkTX <falktx@falktx.com>
pull/443/head
falkTX 1 year ago
parent
commit
7f45300366
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 11 additions and 0 deletions
  1. +10
    -0
      distrho/src/DistrhoPluginCLAP.cpp
  2. +1
    -0
      distrho/src/DistrhoPluginVST3.cpp

+ 10
- 0
distrho/src/DistrhoPluginCLAP.cpp View File

@@ -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


+ 1
- 0
distrho/src/DistrhoPluginVST3.cpp View File

@@ -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


Loading…
Cancel
Save