]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Optimise bindable unicode codepoint range
authorbones_was_here <bones_was_here@xonotic.au>
Sun, 5 Feb 2023 11:12:46 +0000 (21:12 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sun, 5 Feb 2023 11:12:46 +0000 (21:12 +1000)
This improves FPS on (specifically) the Xonotic key bindings menu
screen.

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

diff --git a/keys.h b/keys.h
index 26c711d0838e17dfa9699afd391a2f59e4710aee..2081e8009e21d9322df83943a5b834df86b8cf81 100644 (file)
--- a/keys.h
+++ b/keys.h
@@ -36,7 +36,9 @@
 // the highest Unicode character to allow key binding.
 // note that an excessively high value may degrade fps
 // when code is looping through the bindings
-#define MAX_KEY_BINDS 0xfff0
+// U+ABFF is probably the highest bindable codepoint,
+// see: https://github.com/DarkPlacesEngine/darkplaces/pull/68#issuecomment-1416802873
+#define MAX_KEY_BINDS 0xAC00
 
 // how long is a "tinystr" to hold a keyboard key's
 // Unicode utf-8 presentation, plus final \x00