From 5e0aba058954dd65a03de6aeb856bb53cbeddf40 Mon Sep 17 00:00:00 2001 From: LazyBumHorse Date: Mon, 22 Jul 2019 13:16:22 +0200 Subject: [PATCH] Revert "(UWP) UWP cannot deal with relative paths, turn them into absolute" This reverts commit 8b0f083a4e4a011dbcbe395f98f980ae948ee2fe. --- gfx/drivers_shader/glslang_util.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gfx/drivers_shader/glslang_util.cpp b/gfx/drivers_shader/glslang_util.cpp index e9253f175d..40c0281cdc 100644 --- a/gfx/drivers_shader/glslang_util.cpp +++ b/gfx/drivers_shader/glslang_util.cpp @@ -47,26 +47,15 @@ bool glslang_read_shader_file(const char *path, vector *output, bool roo char *buf = nullptr; int64_t len = 0; const char *basename = path_basename(path); - size_t path_size = PATH_MAX_LENGTH * sizeof(char); - char *tmp_path = (char*)malloc(path_size); include_path[0] = tmp[0] = '\0'; - strlcpy(tmp_path, path, path_size); - path_resolve_realpath(tmp_path, path_size, false); - - if (!path_is_valid(tmp_path)) - strlcpy(tmp_path, path, path_size); - - if (!filestream_read_file(tmp_path, (void**)&buf, &len)) + if (!filestream_read_file(path, (void**)&buf, &len)) { - RARCH_ERR("Failed to open shader file: \"%s\".\n", tmp_path); - free(tmp_path); + RARCH_ERR("Failed to open shader file: \"%s\".\n", path); return false; } - free(tmp_path); - /* Remove Windows \r chars if we encounter them. * filestream_read_file() allocates one extra for 0 terminator. */ auto itr = remove_if(buf, buf + len + 1, [](char c) {