| 4552 | } |
| 4553 | |
| 4554 | void reshade::runtime::open_code_editor(size_t effect_index, size_t permutation_index, const std::string &entry_point) |
| 4555 | { |
| 4556 | assert(effect_index < _effects.size()); |
| 4557 | |
| 4558 | const std::filesystem::path &path = _effects[effect_index].source_file; |
| 4559 | |
| 4560 | if (const auto it = std::find_if(_editors.begin(), _editors.end(), |
| 4561 | [effect_index, permutation_index, &path, &entry_point](const editor_instance &instance) { |
| 4562 | return instance.effect_index == effect_index && instance.permutation_index == permutation_index && instance.file_path == path && instance.generated && instance.entry_point_name == entry_point; |
| 4563 | }); |
| 4564 | it != _editors.end()) |
| 4565 | { |
| 4566 | it->selected = true; |
| 4567 | open_code_editor(*it); |
| 4568 | } |
| 4569 | else |
| 4570 | { |
| 4571 | editor_instance instance { effect_index, permutation_index, path, entry_point, true, true }; |
| 4572 | open_code_editor(instance); |
| 4573 | _editors.push_back(std::move(instance)); |
| 4574 | } |
| 4575 | } |
| 4576 | void reshade::runtime::open_code_editor(size_t effect_index, const std::filesystem::path &path) |
| 4577 | { |
| 4578 | assert(effect_index < _effects.size()); |
nothing calls this directly
no test coverage detected