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

Method open_code_editor

source/runtime_gui.cpp:4554–4575  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4552}
4553
4554void 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}
4576void reshade::runtime::open_code_editor(size_t effect_index, const std::filesystem::path &path)
4577{
4578 assert(effect_index < _effects.size());

Callers

nothing calls this directly

Calls 8

parse_errorsFunction · 0.85
set_textMethod · 0.80
atMethod · 0.80
set_readonlyMethod · 0.80
is_modifiedMethod · 0.80
can_undoMethod · 0.80
clear_errorsMethod · 0.80
add_errorMethod · 0.80

Tested by

no test coverage detected