[SCM] projectm/master: Set LC_NUMERIC to "C" in libprojectM

ximion-guest at users.alioth.debian.org ximion-guest at users.alioth.debian.org
Wed Mar 23 15:32:30 UTC 2011


The following commit has been merged in the master branch:
commit e4be3e9b744cf22f0cc6b5aea3bdcbf47e01528e
Author: Matthias Klumpp <matthias at nlinux.org>
Date:   Wed Mar 23 16:32:18 2011 +0100

    Set LC_NUMERIC to "C" in libprojectM

diff --git a/debian/patches/14_lprojectm_set-numeric.patch b/debian/patches/14_lprojectm_set-numeric.patch
new file mode 100644
index 0000000..396651c
--- /dev/null
+++ b/debian/patches/14_lprojectm_set-numeric.patch
@@ -0,0 +1,129 @@
+Description: Set LC_NUMERIC to "C" in libprojectM
+ This is a workaround for some strange behaviour appearing on
+ some systems with a different numeric format.
+Bug-Ubuntu: https://bugslaunchpad.net/ubuntu/+source/projectm/+bug/737915
+Forwarded: no
+Author: Matthias Klumpp <matthias at nlinux.org>
+Last-Update: 2011-03-24
+--- a/src/libprojectM/projectM.cpp
++++ b/src/libprojectM/projectM.cpp
+@@ -216,7 +216,7 @@
+     _settings.shuffleEnabled = config.read<bool> ( "Shuffle Enabled", true);
+ 
+     _settings.easterEgg = config.read<float> ( "Easter Egg Parameter", 0.0);
+-    _settings.softCutRatingsEnabled = 
++    _settings.softCutRatingsEnabled =
+ 	config.read<float> ( "Soft Cut Ratings Enabled", false);
+ 
+     projectM_init ( _settings.meshX, _settings.meshY, _settings.fps,
+@@ -298,9 +298,9 @@
+     void projectM::renderFrame()
+     {
+         #ifdef SYNC_PRESET_SWITCHES
+-        pthread_mutex_lock(&preset_mutex);       
+-        #endif 
+-      
++        pthread_mutex_lock(&preset_mutex);
++        #endif
++
+         #ifdef DEBUG
+         char fname[1024];
+         FILE *f = NULL;
+@@ -361,7 +361,7 @@
+         if ( timeKeeper->IsSmoothing() && timeKeeper->SmoothRatio() <= 1.0 && !m_presetChooser->empty() )
+         {
+ 
+-	
++
+             //	 printf("start thread\n");
+             assert ( m_activePreset2.get() );
+ 
+@@ -392,7 +392,7 @@
+ 
+ 	    pipeline.drawables.clear();
+ 
+-	    /*		
++	    /*
+ 	    while (!pipeline.drawables.empty()) {
+ 		delete(pipeline.drawables.back());
+ 		pipeline.drawables.pop_back();
+@@ -447,9 +447,9 @@
+         #endif /** !WIN32 */
+ 
+ 	#ifdef SYNC_PRESET_SWITCHES
+-        pthread_mutex_unlock(&preset_mutex);        
+-        #endif 
+-	
++        pthread_mutex_unlock(&preset_mutex);
++        #endif
++
+     }
+ 
+     void projectM::projectM_reset()
+@@ -461,11 +461,14 @@
+ 
+         this->fpsstart = 0;
+ 
++        setlocale(LC_NUMERIC, "C");
++
+         projectM_resetengine();
+     }
+ 
+     void projectM::projectM_init ( int gx, int gy, int fps, int texsize, int width, int height )
+     {
++        setlocale(LC_NUMERIC, "C");
+ 
+         /** Initialise start time */
+         timeKeeper = new TimeKeeper(_settings.presetDuration,_settings.smoothPresetDuration, _settings.easterEgg);
+@@ -494,9 +497,9 @@
+ 
+         #ifdef USE_THREADS
+         pthread_mutex_init(&mutex, NULL);
+-        
++
+ 	#ifdef SYNC_PRESET_SWITCHES
+-        pthread_mutex_init(&preset_mutex, NULL);        
++        pthread_mutex_init(&preset_mutex, NULL);
+ 	#endif
+ 
+         pthread_cond_init(&condition, NULL);
+@@ -772,19 +775,19 @@
+ 			timeKeeper->StartPreset();
+ 		}
+ 		presetSwitchedEvent(hardCut, **m_presetPos);
+-		
+-	
++
++
+ }
+ 
+ /**
+- * 
+- * @param targetPreset 
++ *
++ * @param targetPreset
+  */
+ void projectM::switchPreset(std::auto_ptr<Preset> & targetPreset) {
+ 
+-	#ifdef SYNC_PRESET_SWITCHES	
+-	pthread_mutex_lock(&preset_mutex);	
+-	#endif 
++	#ifdef SYNC_PRESET_SWITCHES
++	pthread_mutex_lock(&preset_mutex);
++	#endif
+ 
+         targetPreset = m_presetPos->allocate();
+ 
+@@ -792,9 +795,9 @@
+         renderer->setPresetName(targetPreset->name());
+         renderer->SetPipeline(targetPreset->pipeline());
+ 
+-	#ifdef SYNC_PRESET_SWITCHES	
+-	pthread_mutex_unlock(&preset_mutex);	
+-	#endif 
++	#ifdef SYNC_PRESET_SWITCHES
++	pthread_mutex_unlock(&preset_mutex);
++	#endif
+     }
+ 
+     void projectM::setPresetLock ( bool isLocked )
diff --git a/debian/patches/series b/debian/patches/series
index 9a3096e..d0f313c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@
 11_lprojectm_change-texture-size.patch
 12_lprojectm_change-preset-duration.patch
 13_lprojectm_cmake_freetype.patch
+14_lprojectm_set-numeric.patch

-- 
projectm packaging



More information about the pkg-multimedia-commits mailing list