shithub: choc

Download patch

ref: 7f27444e2e93702fbd23dedc0fb7e7b4f3e13e50
parent: 1e0abaad4f8249eab598ce69f8f8c2fa261d7733
author: Simon Howard <[email protected]>
date: Sat Aug 17 17:34:17 EDT 2013

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

--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1843,10 +1843,13 @@
 	}
 	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)
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -2180,7 +2180,12 @@
         }
         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?