Skip to content

Commit

Permalink
Controls: Prevent changing the Delete key binding in menu
Browse files Browse the repository at this point in the history
It would be impossible to delete bindings in the Controls menu if
the key-delete binding is changed in the menu/shortcut context.

See bug: http://sourceforge.net/tracker/index.php?func=detail&aid=2508973&group_id=74815&atid=542099
  • Loading branch information
skyjake committed Apr 13, 2012
1 parent bd3d319 commit 8349a2a
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 @@ -711,6 +711,13 @@ int MNBindings_PrivilegedResponder(mn_object_t* obj, event_t* ev)
if(binds->bindContext)
{
bindContext = binds->bindContext;

if((!strcmp(bindContext, "menu") || !strcmp(bindContext, "shortcut")) &&
!strcmp(symbol + 5, "key-delete-down"))
{
Con_Message("The Delete key in the Menu context is reserved for deleting bindings.\n");
return false;
}
}

if(binds->command)
Expand Down

0 comments on commit 8349a2a

Please sign in to comment.