Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix last commit, also fix non-english locales for clap
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Sep 29, 2023
1 parent 4f11f8c commit 7f45300
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions distrho/src/DistrhoPluginCLAP.cpp
Expand Up @@ -1214,9 +1214,14 @@ class PluginCLAP : ClapEventQueue
}

if (isInteger)
{
*value = std::atoi(display);
}
else
{
const ScopedSafeLocale ssl;
*value = std::atof(display);
}

return true;
}
Expand Down Expand Up @@ -1673,9 +1678,14 @@ class PluginCLAP : ClapEventQueue
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
Expand Down
1 change: 1 addition & 0 deletions distrho/src/DistrhoPluginVST3.cpp
Expand Up @@ -962,6 +962,7 @@ class PluginVst3
if (read == 0)
return empty ? V3_INVALID_ARG : V3_OK;

empty = false;
for (int32_t i = 0; i < read; ++i)
{
// found terminator, stop here
Expand Down

0 comments on commit 7f45300

Please sign in to comment.