fix headless mode fatal error in some systems
This commit is contained in:
+3
-3
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user