\r
#include "../concurrency/executor.h"\r
#include "../utility/timer.h"\r
+#include "../env.h"\r
\r
#include <SFML/Graphics.hpp>\r
\r
\r
static void register_drawable(const std::shared_ptr<drawable>& drawable)\r
{\r
+ if(!drawable)\r
+ return;\r
+\r
begin_invoke([=]\r
{\r
get_instance().do_register_drawable(drawable);\r
implementation& operator=(implementation&);\r
};\r
\r
-graph::graph(const std::string& name) : impl_(new implementation(name))\r
+graph::graph(const std::string& name) : impl_(env::properties().get("configuration.diagnostics.graphs", true) ? new implementation(name) : nullptr)\r
{\r
- context::register_drawable(impl_);\r
+ if(impl_)\r
+ context::register_drawable(impl_);\r
}\r
\r
-void graph::update(const std::string& name, float value){impl_->update(name, value);}\r
-void graph::set(const std::string& name, float value){impl_->set(name, value);}\r
-void graph::tag(const std::string& name){impl_->tag(name);}\r
-void graph::guide(const std::string& name, float value){impl_->guide(name, value);}\r
-void graph::set_color(const std::string& name, color c){impl_->set_color(name, c);}\r
+void graph::update(const std::string& name, float value){if(impl_)impl_->update(name, value);}\r
+void graph::set(const std::string& name, float value){if(impl_)impl_->set(name, value);}\r
+void graph::tag(const std::string& name){if(impl_)impl_->tag(name);}\r
+void graph::guide(const std::string& name, float value){if(impl_)impl_->guide(name, value);}\r
+void graph::set_color(const std::string& name, color c){if(impl_)impl_->set_color(name, c);}\r
\r
safe_ptr<graph> create_graph(const std::string& name)\r
{\r
media = widen(paths.get("media-path", initialPath + "\\media\\"));\r
log = widen(paths.get("log-path", initialPath + "\\log\\"));\r
ftemplate = widen(paths.get("template-path", initialPath + "\\template\\"));\r
- ftemplate_host = widen(paths.get("template-host-path", initialPath + "\\template\\cg.fth"));\r
+ ftemplate_host = ftemplate + L"\\" + widen(paths.get("template-host", "cg.fth"));\r
data = widen(paths.get("data-path", initialPath + "\\data\\"));\r
}\r
\r
<media-path>C:\\Casparcg\\_media\\</media-path>\r
<log-path>C:\\Casparcg\\_log\\</log-path>\r
<template-path>C:\\Casparcg\\</template-path>\r
- <template-host-path>C:\\Casparcg\\cg.fth.18</template-host-path>\r
+ <template-host>cg.fth.18</template-host>\r
<data-path>C:\\Casparcg\\_data\\</data-path>\r
</paths>\r
+ <diagnostics>\r
+ <graphs>false</graphs>\r
+ </diagnostics>\r
<channels>\r
<channel>\r
<videomode>PAL</videomode>\r