diff --git a/src/Settings.cpp b/src/Settings.cpp
index cfbe2e2c..688eaae3 100644
--- a/src/Settings.cpp
+++ b/src/Settings.cpp
@@ -28,14 +28,14 @@
* along with OpenShot Library. If not, see .
*/
+#include // For std::getenv
+
#include "Settings.h"
-using namespace std;
using namespace openshot;
-
// Global reference to Settings
-Settings *Settings::m_pInstance = NULL;
+Settings *Settings::m_pInstance = nullptr;
// Create or Get an instance of the settings singleton
Settings *Settings::Instance()
@@ -53,6 +53,9 @@ Settings *Settings::Instance()
m_pInstance->HW_EN_DEVICE_SET = 0;
m_pInstance->PLAYBACK_AUDIO_DEVICE_NAME = "";
m_pInstance->DEBUG_TO_STDERR = false;
+ auto env_debug = std::getenv("LIBOPENSHOT_DEBUG");
+ if (env_debug != nullptr)
+ m_pInstance->DEBUG_TO_STDERR = true;
}
return m_pInstance;
diff --git a/src/Settings.h b/src/Settings.h
index 36ba2917..e21822a0 100644
--- a/src/Settings.h
+++ b/src/Settings.h
@@ -31,19 +31,7 @@
#ifndef OPENSHOT_SETTINGS_H
#define OPENSHOT_SETTINGS_H
-
-#include
-#include
-#include
-#include
#include
-#include
-#include
-#include
-#include
-#include
-#include
-
namespace openshot {
@@ -118,7 +106,7 @@ namespace openshot {
/// The current install path of OpenShot (needs to be set when using Timeline(path), since certain
/// paths depend on the location of OpenShot transitions and files)
std::string PATH_OPENSHOT_INSTALL = "";
-
+
/// Whether to dump ZeroMQ debug messages to stderr
bool DEBUG_TO_STDERR = false;