Skip to content

Instantly share code, notes, and snippets.

@deltaoscarmike
Created September 2, 2018 17:56
Show Gist options
  • Save deltaoscarmike/dc3d55db354b2169de8685180b4ae4dc to your computer and use it in GitHub Desktop.
Save deltaoscarmike/dc3d55db354b2169de8685180b4ae4dc to your computer and use it in GitHub Desktop.
diff --git a/src/libprojectM/projectM.cpp b/src/libprojectM/projectM.cpp
index d9431495..da8b7c2e 100755
--- a/src/libprojectM/projectM.cpp
+++ b/src/libprojectM/projectM.cpp
@@ -228,7 +228,7 @@ void projectM::readConfig (const std::string & configFile )
_settings.easterEgg = config.read<float> ( "Easter Egg Parameter", 0.0);
_settings.softCutRatingsEnabled =
- config.read<float> ( "Soft Cut Ratings Enabled", false);
+ config.read<bool> ( "Soft Cut Ratings Enabled", false);
projectM_init ( _settings.meshX, _settings.meshY, _settings.fps,
_settings.textureSize, _settings.windowWidth,_settings.windowHeight);
diff --git a/src/libprojectM/projectM.hpp b/src/libprojectM/projectM.hpp
index b50f4028..6dda32a2 100755
--- a/src/libprojectM/projectM.hpp
+++ b/src/libprojectM/projectM.hpp
@@ -135,6 +135,21 @@ public:
float easterEgg;
bool shuffleEnabled;
bool softCutRatingsEnabled;
+
+ Settings() :
+ meshX(32),
+ meshY(24),
+ fps(35),
+ textureSize(512),
+ windowWidth(512),
+ windowHeight(512),
+ smoothPresetDuration(10),
+ presetDuration(15),
+ beatSensitivity(10.0),
+ aspectCorrection(true),
+ easterEgg(0.0),
+ shuffleEnabled(true),
+ softCutRatingsEnabled(false) {}
};
projectM(std::string config_file, int flags = FLAG_NONE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment