res/bindings.toml moved to res/config
This commit is contained in:
parent
3a6fa57630
commit
d3e34741e0
@ -252,6 +252,16 @@ void Engine::loadAssets() {
|
||||
assets.reset(new_assets.release());
|
||||
}
|
||||
|
||||
static void load_configs(const fs::path& root) {
|
||||
auto configFolder = root/fs::path("config");
|
||||
auto bindsFile = configFolder/fs::path("bindings.toml");
|
||||
if (fs::is_regular_file(bindsFile)) {
|
||||
Events::loadBindingsToml(
|
||||
bindsFile.u8string(), files::read_string(bindsFile)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void Engine::loadContent() {
|
||||
auto resdir = paths->getResources();
|
||||
ContentBuilder contentBuilder;
|
||||
@ -274,14 +284,10 @@ void Engine::loadContent() {
|
||||
ContentLoader loader(&pack);
|
||||
loader.load(contentBuilder);
|
||||
|
||||
auto configFolder = pack.folder/fs::path("config");
|
||||
auto bindsFile = configFolder/fs::path("bindings.toml");
|
||||
if (fs::is_regular_file(bindsFile)) {
|
||||
Events::loadBindingsToml(
|
||||
bindsFile.u8string(), files::read_string(bindsFile)
|
||||
);
|
||||
}
|
||||
}
|
||||
load_configs(pack.folder);
|
||||
}
|
||||
load_configs(paths->getResources());
|
||||
|
||||
content = contentBuilder.build();
|
||||
resPaths = std::make_unique<ResPaths>(resdir, resRoots);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user