mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
Revert "(UWP) UWP cannot deal with relative paths, turn them into absolute"
This reverts commit 8b0f083a4e4a011dbcbe395f98f980ae948ee2fe.
This commit is contained in:
parent
5047d6e709
commit
5e0aba0589
@ -47,26 +47,15 @@ bool glslang_read_shader_file(const char *path, vector<string> *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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user