Skip to content

Commit 5e4cc4d

Browse files
committed
fix keybinds not getting set properly on 1st launch
1 parent dcffb29 commit 5e4cc4d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

mod.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"geode": "4.0.0-beta.1",
2+
"geode": "4.0.1",
33
"gd": {
44
"win": "2.2074",
55
"android": "2.2074"

src/Keybinds.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ Bind* BindManager::loadBind(matjson::Value const& json) const {
326326
bool BindManager::loadActionBinds(ActionID const& action) {
327327
auto inner = [&]() -> Result<> {
328328
auto value = Mod::get()->getSavedValue<matjson::Value>(action);
329+
if(!value["binds"].isArray()) {
330+
return Err("Bind not set");
331+
}
329332
for (auto bind : value["binds"]) {
330333
// try directly parsing the bind from a string if the device it's for
331334
// is already connected

0 commit comments

Comments
 (0)