]> git.sesse.net Git - vlc/commitdiff
* setlocale( LC_NUMERIC, "C" ). There still might be some place where its
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 13 Aug 2005 22:15:37 +0000 (22:15 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 13 Aug 2005 22:15:37 +0000 (22:15 +0000)
   missing. Beware that this change configuration saving output (it used
   to be saved in users locale).

   this should fix float config options save/load rounding issues. If someone
   has a better fix, feel free to do so (but please dont revert a commit and
   provide no alternative fix)

src/libvlc.c
src/misc/configuration.c

index 173910b8d6138350c4e2028145b2f0e782767f54..9fcf4970a5f2f67e04960d9516b7cf8aad4e02e7 100644 (file)
@@ -1918,6 +1918,7 @@ static void SetLanguage ( char const *psz_lang )
 #endif
 
         setlocale( LC_ALL, psz_lang );
+        setlocale(LC_NUMERIC, "C" );
     }
 
     /* Specify where to find the locales for current domain */
index 820cb4da6dd3fb639e6967c9a290e7103a43e439..c45499856363e14190eea1b80e1c3b009c6e1678 100644 (file)
@@ -758,6 +758,8 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
     char *psz_filename, *psz_homedir, *psz_configfile;
     int i_index;
 
+    setlocale( LC_NUMERIC, "C" );
+
     psz_configfile = p_this->p_vlc->psz_configfile;
     if( !psz_configfile || !psz_configfile )
     {
@@ -1026,6 +1028,8 @@ int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
     char *psz_filename, *psz_homedir, *psz_configfile;
     int i_index;
 
+    setlocale( LC_NUMERIC, "C" );
+
     /* Acquire config file lock */
     vlc_mutex_lock( &p_this->p_vlc->config_lock );