#include <boost/filesystem.hpp>\r
#include <boost/thread.hpp>\r
#include <boost/timer.hpp>\r
+#include <boost/algorithm/string.hpp>\r
\r
#include <functional>\r
\r
}\r
catch(...)\r
{\r
- CASPAR_LOG(info) << L" Found no correct template-host configuration. Using cg.fth.";\r
}\r
-\r
+ \r
template_host template_host;\r
template_host.filename = "cg.fth";\r
+\r
+ for(auto it = boost::filesystem2::wdirectory_iterator(env::template_folder()); it != boost::filesystem2::wdirectory_iterator(); ++it)\r
+ {\r
+ if(boost::iequals(it->path().extension(), L"." + desc.name))\r
+ {\r
+ template_host.filename = narrow(it->filename());\r
+ break;\r
+ }\r
+ }\r
+\r
template_host.width = desc.width;\r
template_host.height = desc.height;\r
return template_host;\r