diff plugin/RealTimePluginFactory.cpp @ 303:15b47d30c085

* Ensure locale from environment is retained after plugin load, not just C locale
author Chris Cannam
date Fri, 05 Oct 2007 13:26:47 +0000
parents dc46851837d6
children 115f60df1e4d
line wrap: on
line diff
--- a/plugin/RealTimePluginFactory.cpp	Thu Oct 04 16:34:11 2007 +0000
+++ b/plugin/RealTimePluginFactory.cpp	Fri Oct 05 13:26:47 2007 +0000
@@ -25,6 +25,8 @@
 #include "LADSPAPluginFactory.h"
 #include "DSSIPluginFactory.h"
 
+#include "system/System.h"
+
 #include <iostream>
 
 int RealTimePluginFactory::m_sampleRate = 48000;
@@ -98,7 +100,8 @@
     }
 
     // Plugins can change the locale, revert it to default.
-    setlocale(LC_ALL, "C");
+    RestoreStartupLocale();
+
     return rv;
 }