X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fflash%2Fproducer%2Fflash_producer.cpp;h=aa03e29807fa4c7db71db952e7c9828c25b8a921;hb=cd21d5c0a69a732eccd1c4620b9ccd0555f057c3;hp=9ac975017b3b4aa683611be3aee444a7ebe42d5e;hpb=c4647c09f2092df9a71635d5866da89dce3a4fef;p=casparcg diff --git a/modules/flash/producer/flash_producer.cpp b/modules/flash/producer/flash_producer.cpp index 9ac975017..aa03e2980 100644 --- a/modules/flash/producer/flash_producer.cpp +++ b/modules/flash/producer/flash_producer.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include @@ -121,11 +122,20 @@ template_host get_template_host(const core::video_format_desc& desc) } catch(...) { - CASPAR_LOG(info) << L" Found no correct template-host configuration. Using cg.fth."; } - + template_host template_host; template_host.filename = "cg.fth"; + + for(auto it = boost::filesystem2::wdirectory_iterator(env::template_folder()); it != boost::filesystem2::wdirectory_iterator(); ++it) + { + if(boost::iequals(it->path().extension(), L"." + desc.name)) + { + template_host.filename = narrow(it->filename()); + break; + } + } + template_host.width = desc.width; template_host.height = desc.height; return template_host;