]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Accept "ctrl" + "=" for increasing console text size (#167)
authorJames O'Neill <hemebond@gmail.com>
Sun, 21 Apr 2024 15:28:29 +0000 (00:28 +0900)
committerGitHub <noreply@github.com>
Sun, 21 Apr 2024 15:28:29 +0000 (01:28 +1000)
Can't use the "=+" key to increase the console text size because the
code only wants "+"; ctrl+shift+= also does not work. Keypad + works.
This patch makes it accept the = key as well as +.

Fixes #110 .

See https://github.com/DarkPlacesEngine/darkplaces/pull/167

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
keys.c

diff --git a/keys.c b/keys.c
index a3a6d9268601045bd102472293893308021bc966..0762490e5fee4b634e68cb02191a0bf13b1f9660 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -1265,7 +1265,7 @@ static void Key_Console(cmd_state_t *cmd, int key, int unicode)
        if (keydown[K_CTRL])
        {
                // text zoom in
-               if ((key == '+' || key == K_KP_PLUS) && KM_CTRL)
+               if ((key == '=' || key == '+' || key == K_KP_PLUS) && KM_CTRL)
                {
                        if (con_textsize.integer < 128)
                                Cvar_SetValueQuick(&con_textsize, con_textsize.integer + 1);