shithub: choc

Download patch

ref: f1926e7b81cd7e3e9d429590102dedb8d3e66f5a
parent: 33703db6c4ca9c23c3d5cbc4b8602bd9679f234a
author: Simon Howard <[email protected]>
date: Sat Nov 16 21:17:40 EST 2013

Remove KEY_RSHIFT special-casing from Heretic/Hexen menu code to fix
crashes when pressing shift while entering save game names (thanks
chungy).

Subversion-branch: /branches/v2-branch
Subversion-revision: 2750

--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -1079,10 +1079,11 @@
         return true;
     }
 
-    if (event->data1 != KEY_RSHIFT && event->type != ev_keydown)
+    if (event->type != ev_keydown)
     {
-        return (false);
+        return false;
     }
+
     key = event->data1;
     charTyped = event->data2;
 
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -1174,7 +1174,9 @@
         return true;
     }
 
-    if (event->data1 != KEY_RSHIFT && event->type != ev_keydown)
+    // Only care about keypresses beyond this point.
+
+    if (event->type != ev_keydown)
     {
         return false;
     }