Skip to content

Commit

Permalink
All Games: Menu should not be activated by the Shift key
Browse files Browse the repository at this point in the history
Otherwise Shift-Esc will be difficult to use in the main menu screen,
as Shift will activate the menu and expire the key due to the binding
context change.
  • Loading branch information
skyjake committed Apr 28, 2012
1 parent 9cada07 commit 10a7921
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
5 changes: 3 additions & 2 deletions doomsday/engine/api/dd_share.h
Expand Up @@ -302,8 +302,9 @@ enum {
DD_TORCH_GREEN,
DD_TORCH_BLUE,
DD_TORCH_ADDITIVE,
DD_TM_FLOOR_Z, ///< output from P_CheckPosition
DD_TM_CEILING_Z ///< output from P_CheckPosition
DD_TM_FLOOR_Z, ///< output from P_CheckPosition
DD_TM_CEILING_Z, ///< output from P_CheckPosition
DD_SHIFT_DOWN
};

/// Bounding box coordinates.
Expand Down
1 change: 1 addition & 0 deletions doomsday/engine/portable/include/dd_input.h
Expand Up @@ -217,6 +217,7 @@ void I_ShutdownInputDevices(void);
void I_ClearDeviceContextAssociations(void);
void I_DeviceReset(uint ident);
void I_ResetAllDevices(void);
boolean I_ShiftDown(void);

inputdev_t* I_GetDevice(uint ident, boolean ifactive);
inputdev_t* I_GetDeviceByName(const char* name, boolean ifactive);
Expand Down
5 changes: 5 additions & 0 deletions doomsday/engine/portable/src/dd_input.c
Expand Up @@ -614,6 +614,11 @@ static void I_UpdateAxis(inputdev_t *dev, uint axis, float pos, timespan_t ticLe
}*/
}

boolean I_ShiftDown(void)
{
return shiftDown;
}

/**
* Update the input device state table.
*/
Expand Down
3 changes: 3 additions & 0 deletions doomsday/engine/portable/src/dd_main.c
Expand Up @@ -2038,6 +2038,9 @@ int DD_GetInteger(int ddvalue)
{
switch(ddvalue)
{
case DD_SHIFT_DOWN:
return I_ShiftDown();

case DD_WINDOW_WIDTH:
return Window_Width(theWindow);

Expand Down
2 changes: 1 addition & 1 deletion doomsday/plugins/common/src/g_game.c
Expand Up @@ -1028,7 +1028,7 @@ int G_UIResponder(event_t* ev)
if(!(ev->type == EV_KEY || ev->type == EV_MOUSE_BUTTON || ev->type == EV_JOY_BUTTON))
return false;

if(!Hu_MenuIsActive())
if(!Hu_MenuIsActive() && !DD_GetInteger(DD_SHIFT_DOWN))
{
// Any key/button down pops up menu if in demos.
if((G_GameAction() == GA_NONE && !singledemo && Get(DD_PLAYBACK)) ||
Expand Down

0 comments on commit 10a7921

Please sign in to comment.