Fix mini variant param message for non-english locales
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
c883a9db68
commit
daf8d467f7
2 changed files with 10 additions and 2 deletions
|
@ -44,6 +44,7 @@
|
|||
#include "DistrhoPluginUtils.hpp"
|
||||
#include "PluginContext.hpp"
|
||||
#include "extra/Base64.hpp"
|
||||
#include "extra/ScopedSafeLocale.hpp"
|
||||
|
||||
#ifdef DISTRHO_OS_WASM
|
||||
# include <emscripten/emscripten.h>
|
||||
|
@ -841,7 +842,10 @@ protected:
|
|||
long long moduleId = 0;
|
||||
int paramId = 0;
|
||||
float paramValue = 0.f;
|
||||
std::sscanf(value, "%lld:%d:%f", &moduleId, ¶mId, ¶mValue);
|
||||
{
|
||||
const ScopedSafeLocale cssl;
|
||||
std::sscanf(value, "%lld:%d:%f", &moduleId, ¶mId, ¶mValue);
|
||||
}
|
||||
|
||||
rack::engine::Module* const module = context->engine->getModule(moduleId);
|
||||
DISTRHO_SAFE_ASSERT_RETURN(module != nullptr,);
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "CardinalRemote.hpp"
|
||||
#include "PluginContext.hpp"
|
||||
#include "extra/Base64.hpp"
|
||||
#include "extra/ScopedSafeLocale.hpp"
|
||||
|
||||
#if defined(STATIC_BUILD) || CARDINAL_VARIANT_MINI
|
||||
# undef HAVE_LIBLO
|
||||
|
@ -139,7 +140,10 @@ void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int
|
|||
{
|
||||
#if CARDINAL_VARIANT_MINI
|
||||
char paramBuf[512] = {};
|
||||
std::snprintf(paramBuf, sizeof(paramBuf), "%lld:%d:%f", (long long)moduleId, paramId, value);
|
||||
{
|
||||
const ScopedSafeLocale cssl;
|
||||
std::snprintf(paramBuf, sizeof(paramBuf), "%lld:%d:%f", (long long)moduleId, paramId, value);
|
||||
}
|
||||
static_cast<CardinalBaseUI*>(remote->handle)->setState("param", paramBuf);
|
||||
#elif defined(HAVE_LIBLO)
|
||||
const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue