| 39 | #include <stb_image_resize2.h> |
| 40 | |
| 41 | bool 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 | |
| 55 | bool resolve_preset_path(std::filesystem::path &path, std::error_code &ec) |
| 56 | { |
no outgoing calls
no test coverage detected