summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2013-10-28 00:25:41 +0000
committerSimon Howard2013-10-28 00:25:41 +0000
commitb07602b54dfb30d8f708901f41e1f2fce2ed2961 (patch)
tree357ba7378e962609c579653b6687dcdadd695980
parent0b4df30a99ac27177fef1c254fe26943c4859aac (diff)
downloadchocolate-doom-b07602b54dfb30d8f708901f41e1f2fce2ed2961.tar.gz
chocolate-doom-b07602b54dfb30d8f708901f41e1f2fce2ed2961.tar.bz2
chocolate-doom-b07602b54dfb30d8f708901f41e1f2fce2ed2961.zip
Fix Vanilla behavior of shift key when entering savegame names in the
menu (thanks Alexandre Xavier). Subversion-branch: /branches/v2-branch Subversion-revision: 2723
-rw-r--r--src/doom/m_menu.c14
-rw-r--r--src/strife/m_menu.c12
2 files changed, 23 insertions, 3 deletions
diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c
index 233fe641..4951d9a6 100644
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1586,9 +1586,19 @@ boolean M_Responder (event_t* ev)
if (savegamestrings[saveSlot][0])
M_DoSave(saveSlot);
break;
-
+
default:
- // Entering a character - use the 'ch' value, not the key
+ // This is complicated.
+ // Vanilla has a bug where the shift key is ignored when entering
+ // a savegame name. If vanilla_keyboard_mapping is on, we want
+ // to emulate this bug by using 'data1'. But if it's turned off,
+ // it implies the user doesn't care about Vanilla emulation: just
+ // use the correct 'data2'.
+
+ if (vanilla_keyboard_mapping)
+ {
+ ch = key;
+ }
ch = toupper(ch);
diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c
index 6426232f..e278bc74 100644
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -1869,7 +1869,17 @@ boolean M_Responder (event_t* ev)
break;
default:
- // Entering a character - use the 'ch' value, not the key
+ // This is complicated.
+ // Vanilla has a bug where the shift key is ignored when entering
+ // a savegame name. If vanilla_keyboard_mapping is on, we want
+ // to emulate this bug by using 'data1'. But if it's turned off,
+ // it implies the user doesn't care about Vanilla emulation: just
+ // use the correct 'data2'.
+
+ if (vanilla_keyboard_mapping)
+ {
+ ch = key;
+ }
ch = toupper(ch);