Skip to content

Commit

Permalink
Fixed Common code library: The InFine script command 'notrigger' does…
Browse files Browse the repository at this point in the history
… not work, allowing the menu to be opened.
  • Loading branch information
danij-deng committed Apr 25, 2010
1 parent 96de7e2 commit acaaa50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions doomsday/plugins/common/src/g_game.c
Expand Up @@ -756,19 +756,19 @@ int G_UIResponder(event_t* ev)
if(Hu_MsgResponder(ev))
return true;

if(ev->state != EVS_DOWN)
return false;
if(!(ev->type == EV_KEY || ev->type == EV_MOUSE_BUTTON || ev->type == EV_JOY_BUTTON))
return false;

if(!Hu_MenuIsActive())
{
// Any key/button down pops up menu if in demos.
if(G_GetGameAction() == GA_NONE && !singledemo &&
(Get(DD_PLAYBACK) || FI_IsMenuTrigger(ev)))
{
if(ev->state == EVS_DOWN &&
(ev->type == EV_KEY || ev->type == EV_MOUSE_BUTTON ||
ev->type == EV_JOY_BUTTON))
{
Hu_MenuCommand(MCMD_OPEN);
return true;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/hu_menu.c
Expand Up @@ -1819,7 +1819,7 @@ void Hu_MenuCommand(menucommand_e cmd)

if(!menuActive)
{
if(cmd == MCMD_OPEN)
if(cmd == MCMD_OPEN && FI_IsMenuTrigger(NULL))
{
S_LocalSound(SFX_MENU_OPEN, NULL);

Expand Down

0 comments on commit acaaa50

Please sign in to comment.