Skip to content

Commit 233bb1e

Browse files
Zegerieagleivg
authored andcommitted
xrRenderPC_GL: Replace '\'->'/' when loading shader includes in non-Windows
1 parent 6f881ce commit 233bb1e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Layers/xrRenderPC_GL/rgl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,11 @@ static inline void load_includes(LPCSTR pSrcData, UINT SrcDataLen, xr_vector<cha
745745
// Create path to included shader
746746
strconcat(sizeof path, path, GEnv.Render->getShaderPath(), fn);
747747
FS.update_path(path, "$game_shaders$", path);
748+
#if defined(WINDOWS)
748749
while (char* sep = strchr(path, '/')) *sep = '\\';
750+
#else
751+
while (char* sep = strchr(path, '\\')) *sep = '/';
752+
#endif
749753

750754
// Open and read file, recursively load includes
751755
IReader* R = FS.r_open(path);

0 commit comments

Comments
 (0)