Skip to content

Commit

Permalink
xrRenderPC_GL: Replace '\'->'/' when loading shader includes in non-W…
Browse files Browse the repository at this point in the history
…indows
  • Loading branch information
Zegeri authored and eagleivg committed Oct 4, 2018
1 parent 6f881ce commit 233bb1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Layers/xrRenderPC_GL/rgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,11 @@ static inline void load_includes(LPCSTR pSrcData, UINT SrcDataLen, xr_vector<cha
// Create path to included shader
strconcat(sizeof path, path, GEnv.Render->getShaderPath(), fn);
FS.update_path(path, "$game_shaders$", path);
#if defined(WINDOWS)
while (char* sep = strchr(path, '/')) *sep = '\\';
#else
while (char* sep = strchr(path, '\\')) *sep = '/';
#endif

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

0 comments on commit 233bb1e

Please sign in to comment.