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

Function resolve_path

source/runtime.cpp:41–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39#include <stb_image_resize2.h>
40
41bool resolve_path(std::filesystem::path &path, std::error_code &ec)
42{
43 // First convert path to an absolute path
44 // Ignore the working directory and instead start relative paths at the DLL location
45 if (path.is_relative())
46 path = g_reshade_base_path / path;
47 // Finally try to canonicalize the path too
48 if (std::filesystem::path canonical_path = std::filesystem::canonical(path, ec); !ec)
49 path = std::move(canonical_path);
50 else
51 path = path.lexically_normal();
52 return !ec; // The canonicalization step fails if the path does not exist
53}
54
55bool resolve_preset_path(std::filesystem::path &path, std::error_code &ec)
56{

Callers 10

export_current_presetMethod · 0.85
resolve_preset_pathFunction · 0.85
find_fileFunction · 0.85
find_filesFunction · 0.85
runtimeMethod · 0.85
load_configMethod · 0.85
switch_to_next_presetMethod · 0.85
load_effectMethod · 0.85
build_font_atlasMethod · 0.85
draw_gui_homeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected