Fix Vanilla behavior of shift key when entering savegame names in the

menu (thanks Alexandre Xavier).

Subversion-branch: /branches/v2-branch
Subversion-revision: 2723
This commit is contained in:
Simon Howard 2013-10-28 00:25:41 +00:00
parent 0b4df30a99
commit b07602b54d
2 changed files with 23 additions and 3 deletions

View file

@ -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);

View file

@ -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);