Skip to content

Commit

Permalink
SDL: Disable lock keys so that they behave like normal keys
Browse files Browse the repository at this point in the history
This makes Caps Lock behave like with Windows native events.
  • Loading branch information
skyjake committed Feb 9, 2012
1 parent 1fb86ec commit bd6897b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doomsday/engine/unix/src/dd_uinit.c
Expand Up @@ -355,6 +355,9 @@ int main(int argc, char** argv)

memset(&app, 0, sizeof(app));

// SDL lock key behavior: send up event when key released.
setenv("SDL_DISABLE_LOCK_KEYS", "1", true);

/*if(!initApplication(&app))
{
DD_ErrorBox(true, "Failed to initialize application.\n");
Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/hu_lib.c
Expand Up @@ -2264,7 +2264,7 @@ int MNButton_CommandResponder(mn_object_t* obj, menucommand_e cmd)
mndata_button_t* btn = (mndata_button_t*)obj->_typedata;
assert(obj->_type == MN_BUTTON);

if(MCMD_SELECT == cmd)
if(cmd == MCMD_SELECT)
{
boolean justActivated = false;
if(!(obj->_flags & MNF_ACTIVE))
Expand Down

0 comments on commit bd6897b

Please sign in to comment.