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 "DistrhoPluginUtils.hpp"
|
||||||
#include "PluginContext.hpp"
|
#include "PluginContext.hpp"
|
||||||
#include "extra/Base64.hpp"
|
#include "extra/Base64.hpp"
|
||||||
|
#include "extra/ScopedSafeLocale.hpp"
|
||||||
|
|
||||||
#ifdef DISTRHO_OS_WASM
|
#ifdef DISTRHO_OS_WASM
|
||||||
# include <emscripten/emscripten.h>
|
# include <emscripten/emscripten.h>
|
||||||
|
@ -841,7 +842,10 @@ protected:
|
||||||
long long moduleId = 0;
|
long long moduleId = 0;
|
||||||
int paramId = 0;
|
int paramId = 0;
|
||||||
float paramValue = 0.f;
|
float paramValue = 0.f;
|
||||||
|
{
|
||||||
|
const ScopedSafeLocale cssl;
|
||||||
std::sscanf(value, "%lld:%d:%f", &moduleId, ¶mId, ¶mValue);
|
std::sscanf(value, "%lld:%d:%f", &moduleId, ¶mId, ¶mValue);
|
||||||
|
}
|
||||||
|
|
||||||
rack::engine::Module* const module = context->engine->getModule(moduleId);
|
rack::engine::Module* const module = context->engine->getModule(moduleId);
|
||||||
DISTRHO_SAFE_ASSERT_RETURN(module != nullptr,);
|
DISTRHO_SAFE_ASSERT_RETURN(module != nullptr,);
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include "CardinalRemote.hpp"
|
#include "CardinalRemote.hpp"
|
||||||
#include "PluginContext.hpp"
|
#include "PluginContext.hpp"
|
||||||
#include "extra/Base64.hpp"
|
#include "extra/Base64.hpp"
|
||||||
|
#include "extra/ScopedSafeLocale.hpp"
|
||||||
|
|
||||||
#if defined(STATIC_BUILD) || CARDINAL_VARIANT_MINI
|
#if defined(STATIC_BUILD) || CARDINAL_VARIANT_MINI
|
||||||
# undef HAVE_LIBLO
|
# undef HAVE_LIBLO
|
||||||
|
@ -139,7 +140,10 @@ void sendParamChangeToRemote(RemoteDetails* const remote, int64_t moduleId, int
|
||||||
{
|
{
|
||||||
#if CARDINAL_VARIANT_MINI
|
#if CARDINAL_VARIANT_MINI
|
||||||
char paramBuf[512] = {};
|
char paramBuf[512] = {};
|
||||||
|
{
|
||||||
|
const ScopedSafeLocale cssl;
|
||||||
std::snprintf(paramBuf, sizeof(paramBuf), "%lld:%d:%f", (long long)moduleId, paramId, value);
|
std::snprintf(paramBuf, sizeof(paramBuf), "%lld:%d:%f", (long long)moduleId, paramId, value);
|
||||||
|
}
|
||||||
static_cast<CardinalBaseUI*>(remote->handle)->setState("param", paramBuf);
|
static_cast<CardinalBaseUI*>(remote->handle)->setState("param", paramBuf);
|
||||||
#elif defined(HAVE_LIBLO)
|
#elif defined(HAVE_LIBLO)
|
||||||
const lo_address addr = lo_address_new_with_proto(LO_UDP, REMOTE_HOST, CARDINAL_DEFAULT_REMOTE_HOST_PORT);
|
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