Search: Skip spaces and control characters, code cleanup, fix minor issue on desktop

This commit is contained in:
Henrik Rydgård committed 2026-05-11 11:45:04 +02:00
1 parent 3f0fa315b2
commit bc9a047ef1
4 files changed
+8 -7

No files matched your search

+6
View File
@@ -387,7 +387,13 @@ std::string NormalizeForSearch(std::string_view input) {
while (index < size) {
uint32_t codepoint = u8_nextchar(input.data(), &index, size);
// Skip spaces and control characters.
if (codepoint <= 0x20) {
continue;
}
// 1. Convert Fullwidth Roman/Numbers to ASCII
// These are common in Japanese game names.
// Range: U+FF01 (!) to U+FF5E (~)
if (codepoint >= 0xFF01 && codepoint <= 0xFF5E) {
codepoint -= 0xFEE0;