Skip to content

Commit

Permalink
fix keybinds not getting set properly on 1st launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Dec 6, 2024
1 parent dcffb29 commit 5e4cc4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"geode": "4.0.0-beta.1",
"geode": "4.0.1",
"gd": {
"win": "2.2074",
"android": "2.2074"
Expand Down
3 changes: 3 additions & 0 deletions src/Keybinds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,9 @@ Bind* BindManager::loadBind(matjson::Value const& json) const {
bool BindManager::loadActionBinds(ActionID const& action) {
auto inner = [&]() -> Result<> {
auto value = Mod::get()->getSavedValue<matjson::Value>(action);
if(!value["binds"].isArray()) {
return Err("Bind not set");
}
for (auto bind : value["binds"]) {
// try directly parsing the bind from a string if the device it's for
// is already connected
Expand Down

0 comments on commit 5e4cc4d

Please sign in to comment.