From b07602b54dfb30d8f708901f41e1f2fce2ed2961 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Oct 2013 00:25:41 +0000 Subject: Fix Vanilla behavior of shift key when entering savegame names in the menu (thanks Alexandre Xavier). Subversion-branch: /branches/v2-branch Subversion-revision: 2723 --- src/strife/m_menu.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/strife/m_menu.c') 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); -- cgit v1.2.3