obs/gs/effect: Revert #836

The use of const references breaks '#include' for relative paths.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2022-08-19 07:58:45 +02:00
parent 6e1566386e
commit 808f5c63fb

View file

@ -29,9 +29,9 @@
static std::string load_file_as_code(const std::filesystem::path& shader_file, bool is_top_level = true) static std::string load_file_as_code(const std::filesystem::path& shader_file, bool is_top_level = true)
{ {
std::stringstream shader_stream; std::stringstream shader_stream;
const std::filesystem::path& shader_path = std::filesystem::absolute(shader_file); const std::filesystem::path shader_path = std::filesystem::absolute(shader_file.native());
const std::filesystem::path& shader_root = std::filesystem::path(shader_path).remove_filename(); const std::filesystem::path shader_root = std::filesystem::path(shader_path.native()).remove_filename();
// Ensure it meets size limits. // Ensure it meets size limits.
uintmax_t size = std::filesystem::file_size(shader_path); uintmax_t size = std::filesystem::file_size(shader_path);