fix headless mode fatal error in some systems

This commit is contained in:
MihailRis
2025-11-29 18:29:04 +03:00
parent 618b3d7f61
commit bcfcd9ca76
5 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -10,7 +10,7 @@
#include "coders/toml.hpp"
// All in-game definitions (blocks, items, etc..)
void corecontent::setup(Input& input, ContentBuilder& builder) {
void corecontent::setup(Input* input, ContentBuilder& builder) {
{
Block& block = builder.blocks.create(CORE_AIR);
block.replaceable = true;
@@ -28,8 +28,8 @@ void corecontent::setup(Input& input, ContentBuilder& builder) {
}
auto bindsFile = "res:bindings.toml";
if (io::is_regular_file(bindsFile)) {
input.getBindings().read(
if (input && io::is_regular_file(bindsFile)) {
input->getBindings().read(
toml::parse(bindsFile, io::read_string(bindsFile)), BindType::BIND
);
}