From 5da167ebaa7d5c4057111aed404806029580cd88 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Fri, 19 Aug 2022 07:58:45 +0200 Subject: [PATCH] obs/gs/effect: Revert #836 The use of const references breaks '#include' for relative paths. --- source/obs/gs/gs-effect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/obs/gs/gs-effect.cpp b/source/obs/gs/gs-effect.cpp index 8c8d81ae27..a95755f4e5 100644 --- a/source/obs/gs/gs-effect.cpp +++ b/source/obs/gs/gs-effect.cpp @@ -30,8 +30,8 @@ static std::string load_file_as_code(const std::filesystem::path& shader_file, bool is_top_level = true) { std::stringstream shader_stream; - const std::filesystem::path& shader_path = std::filesystem::absolute(shader_file); - const std::filesystem::path& shader_root = std::filesystem::path(shader_path).remove_filename(); + const std::filesystem::path shader_path = std::filesystem::absolute(shader_file.native()); + const std::filesystem::path shader_root = std::filesystem::path(shader_path.native()).remove_filename(); // Ensure it meets size limits. uintmax_t size = std::filesystem::file_size(shader_path);