summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2013-08-17 21:34:17 +0000
committerSimon Howard2013-08-17 21:34:17 +0000
commit7f27444e2e93702fbd23dedc0fb7e7b4f3e13e50 (patch)
tree8dd7bff370d6323176691c362eceb6338b1aaebd /src
parent1e0abaad4f8249eab598ce69f8f8c2fa261d7733 (diff)
downloadchocolate-doom-7f27444e2e93702fbd23dedc0fb7e7b4f3e13e50.tar.gz
chocolate-doom-7f27444e2e93702fbd23dedc0fb7e7b4f3e13e50.tar.bz2
chocolate-doom-7f27444e2e93702fbd23dedc0fb7e7b4f3e13e50.zip
Fix Chocolate Doom/Strife to emulate weird Vanilla behavior when the
pause key is pressed in a menu with a scroll-bar (thanks Alexandre Xavier). Subversion-branch: /branches/v2-branch Subversion-revision: 2620
Diffstat (limited to 'src')
-rw-r--r--src/doom/m_menu.c9
-rw-r--r--src/strife/m_menu.c7
2 files changed, 12 insertions, 4 deletions
diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c
index d10a0622..450f1f12 100644
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1843,10 +1843,13 @@ boolean M_Responder (event_t* ev)
}
return true;
}
- else if (ch != 0)
- {
- // Keyboard shortcut?
+ // Keyboard shortcut?
+ // Vanilla Doom has a weird behavior where it jumps to the scroll bars
+ // when the pause key is pressed, so emulate this.
+
+ else if (ch != 0 || key == KEY_PAUSE)
+ {
for (i = itemOn+1;i < currentMenu->numitems;i++)
{
if (currentMenu->menuitems[i].alphaKey == ch)
diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c
index a4d1b0a7..61d0bd58 100644
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -2180,7 +2180,12 @@ boolean M_Responder (event_t* ev)
}
return true;
}
- else if (ch != 0)
+
+ // Keyboard shortcut?
+ // Vanilla Strife has a weird behavior where it jumps to the scroll bars
+ // when the pause key is pressed, so emulate this.
+
+ else if (ch != 0 || key == KEY_PAUSE)
{
// Keyboard shortcut?