From 0845cf077558d69c8a866c888f25e475ba9e54c9 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 19 May 2023 17:38:33 +0100 Subject: [PATCH] M_ChangeStringVar: Fix Caps Lock by using CON_ShiftChar directly --- src/menus/transient/virtual-keyboard.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/menus/transient/virtual-keyboard.c b/src/menus/transient/virtual-keyboard.c index b5d2bee0c..a9183e67d 100644 --- a/src/menus/transient/virtual-keyboard.c +++ b/src/menus/transient/virtual-keyboard.c @@ -3,7 +3,7 @@ #include "../../k_menu.h" #include "../../s_sound.h" -#include "../../hu_stuff.h" // shiftxform +#include "../../console.h" // CON_ShiftChar #include "../../i_system.h" // I_Clipboard funcs // Typing "sub"-menu @@ -82,11 +82,6 @@ boolean M_ChangeStringCvar(INT32 choice) // shift+delete, cutting copypastemode = CVCPM_CUT; } - else if (choice >= 32 && choice <= 127) - { - // shift+printable, generally uppercase - choice = shiftxform[choice]; - } } if (copypastemode != CVCPM_NONE) @@ -127,6 +122,9 @@ boolean M_ChangeStringCvar(INT32 choice) return true; } + + // Okay, now we can auto-modify the character. + choice = CON_ShiftChar(choice); } switch (choice)