| 85 | } |
| 86 | |
| 87 | reshade::api::effect_uniform_variable reshade::runtime::find_uniform_variable(const char *effect_name_in, const char *variable_name_in) const |
| 88 | { |
| 89 | if (is_loading() || variable_name_in == nullptr) |
| 90 | return { 0 }; |
| 91 | |
| 92 | const std::filesystem::path effect_name = effect_name_in != nullptr ? std::filesystem::u8path(effect_name_in) : std::filesystem::path(); |
| 93 | const std::string_view variable_name(variable_name_in); |
| 94 | |
| 95 | for (const effect &effect : _effects) |
| 96 | { |
| 97 | if (effect_name_in != nullptr && effect.source_file.filename() != effect_name) |
| 98 | continue; |
| 99 | |
| 100 | for (const uniform &variable : effect.uniforms) |
| 101 | { |
| 102 | if (variable.name == variable_name) |
| 103 | return { reinterpret_cast<uintptr_t>(&variable) }; |
| 104 | } |
| 105 | |
| 106 | if (effect_name_in != nullptr) |
| 107 | break; |
| 108 | } |
| 109 | |
| 110 | return { 0 }; |
| 111 | } |
| 112 | |
| 113 | void reshade::runtime::get_uniform_variable_type(api::effect_uniform_variable handle, api::format *out_base_type, uint32_t *out_rows, uint32_t *out_columns, uint32_t *out_array_length) const |
| 114 | { |
no test coverage detected