Skip to content

Commit

Permalink
Controls: Disallow deleting the "menuselect" binding to Return
Browse files Browse the repository at this point in the history
When deleting bindings of "menuselect", automatically restore the
default binding to Return so that the menu remains functional.
  • Loading branch information
skyjake committed Apr 13, 2012
1 parent c206a95 commit bd3d319
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doomsday/plugins/common/src/m_ctrl.c
Expand Up @@ -615,6 +615,13 @@ int MNBindings_CommandResponder(mn_object_t* obj, menucommand_e cmd)
}

iterateBindings(binds, buf, 0, NULL, deleteBinding);

// If deleting the menuselect binding, automatically rebind it Return;
// otherwise the user would be stuck without a way to make further bindings.
if(binds->command && !strcmp(binds->command, "menuselect"))
{
DD_Execute(true, "bindevent menu:key-return menuselect");
}
return true;
}
case MCMD_SELECT:
Expand Down

0 comments on commit bd3d319

Please sign in to comment.