M_ChangeStringVar: Fix Caps Lock by using CON_ShiftChar directly

This commit is contained in:
toaster 2023-05-19 17:38:33 +01:00
parent 276bbebc6f
commit 0845cf0775

View file

@ -3,7 +3,7 @@
#include "../../k_menu.h" #include "../../k_menu.h"
#include "../../s_sound.h" #include "../../s_sound.h"
#include "../../hu_stuff.h" // shiftxform #include "../../console.h" // CON_ShiftChar
#include "../../i_system.h" // I_Clipboard funcs #include "../../i_system.h" // I_Clipboard funcs
// Typing "sub"-menu // Typing "sub"-menu
@ -82,11 +82,6 @@ boolean M_ChangeStringCvar(INT32 choice)
// shift+delete, cutting // shift+delete, cutting
copypastemode = CVCPM_CUT; copypastemode = CVCPM_CUT;
} }
else if (choice >= 32 && choice <= 127)
{
// shift+printable, generally uppercase
choice = shiftxform[choice];
}
} }
if (copypastemode != CVCPM_NONE) if (copypastemode != CVCPM_NONE)
@ -127,6 +122,9 @@ boolean M_ChangeStringCvar(INT32 choice)
return true; return true;
} }
// Okay, now we can auto-modify the character.
choice = CON_ShiftChar(choice);
} }
switch (choice) switch (choice)