From fa5a05f188abfead836d0e64fdb9a4931db5c612 Mon Sep 17 00:00:00 2001 From: jpark37 Date: Tue, 22 Feb 2022 19:06:31 -0800 Subject: [PATCH] UI: Restore LC_NUMERIC to C locale on Mac/Linux Recommended by QCoreApplication doc for Unix. Fixes CUBE LUT load, and FFmpeg output args for foreign locales. --- UI/obs-app.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index 35466fb8b..4ba4e10f0 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -1156,6 +1156,12 @@ bool OBSApp::InitTheme() OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store) : QApplication(argc, argv), profilerNameStore(store) { + /* fix float handling */ +#if defined(Q_OS_UNIX) + if (!setlocale(LC_NUMERIC, "C")) + blog(LOG_WARNING, "Failed to set LC_NUMERIC to C locale"); +#endif + sleepInhibitor = os_inhibit_sleep_create("OBS Video/audio"); #ifdef __APPLE__