Slight rework so that config can have a base dir but the program can start in another one.

This commit is contained in:
Zed A. Shaw 2025-04-23 12:08:36 -04:00
parent d1c2352237
commit 3d4ddde96e
8 changed files with 32 additions and 13 deletions

View file

@ -18,8 +18,10 @@ namespace shaders {
bool load_shader(std::string name, nlohmann::json& settings) {
std::string file_name = settings["file_name"];
auto ptr = std::make_shared<sf::Shader>();
bool good = ptr->loadFromFile(file_name, sf::Shader::Type::Fragment);
bool good = ptr->loadFromFile(Config::path_to(file_name),
sf::Shader::Type::Fragment);
if(good) {
configure_shader_defaults(ptr);