MCPcopy Create free account
hub / github.com/crosire/reshade / find_technique

Method find_technique

source/runtime_api.cpp:769–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767}
768
769reshade::api::effect_technique reshade::runtime::find_technique(const char *effect_name_in, const char *technique_name_in)
770{
771 if (is_loading() || technique_name_in == nullptr)
772 return { 0 };
773
774 const std::filesystem::path effect_name = effect_name_in != nullptr ? std::filesystem::u8path(effect_name_in) : std::filesystem::path();
775 const std::string_view technique_name(technique_name_in);
776
777 for (const technique &technique : _techniques)
778 {
779 if (effect_name_in != nullptr && _effects[technique.effect_index].source_file.filename() != effect_name)
780 continue;
781
782 if (technique.name != technique_name)
783 continue;
784
785 return { reinterpret_cast<uintptr_t>(&technique) };
786 }
787
788 return { 0 };
789}
790
791void reshade::runtime::get_technique_name(api::effect_technique handle, char *value, size_t *size) const
792{

Callers 2

Calls 1

is_loadingFunction · 0.85

Tested by

no test coverage detected