Skip to content

Commit 14fb2af

Browse files
committed
resources path improvements
1 parent bf6afcc commit 14fb2af

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

OpenGL/src/Renderer.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ const std::string& Renderer::ResPath() {
2424
fs::path exe_dir = exe_path.parent_path();
2525

2626
// Check for "res/shaders" relative to the executable's directory
27-
if (fs::exists(exe_dir / "res" / "shaders"))
27+
if (fs::exists(exe_dir / "res" / "shaders")) {
2828
res_path = (exe_dir / "res").string() + "/";
29-
else if (fs::exists(RES_PATH "/res/shaders"))
29+
} else if (fs::exists(RES_PATH "/res/shaders")) {
3030
res_path = RES_PATH "/res/";
31-
else
32-
std::cout << "Resource directory not found\n";
31+
} else {
32+
std::cout << "Resource directory not found relative to " << exe_dir << " or " << RES_PATH << std::endl;
33+
res_path = "./res/";
34+
}
3335
}
3436

3537
return res_path;

0 commit comments

Comments
 (0)