diff options
author | 2016-09-19 08:25:10 -0400 | |
---|---|---|
committer | 2016-09-19 08:25:10 -0400 | |
commit | 1a017c93023f489772d53221cda2248f930636ce (patch) | |
tree | ea7f48c10c4950abbd8f6aa4a3510daacb878ce0 /src/frontend/mame/ui/menu.h | |
parent | ea15eb91112bff6dc9976d192bf2527b1fe8c37a (diff) |
Consolidated code that inputs characters into buffers
Diffstat (limited to 'src/frontend/mame/ui/menu.h')
-rw-r--r-- | src/frontend/mame/ui/menu.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/frontend/mame/ui/menu.h b/src/frontend/mame/ui/menu.h index b4e2c5b05cc..de2b0c8adc7 100644 --- a/src/frontend/mame/ui/menu.h +++ b/src/frontend/mame/ui/menu.h @@ -138,31 +138,6 @@ protected: int iptkey; // one of the IPT_* values from inptport.h unicode_char unichar; // unicode character if iptkey == IPT_SPECIAL render_bounds mouse; // mouse position if iptkey == IPT_CUSTOM - - bool is_char_printable() const - { - return - !(0x0001f >= unichar) && // C0 control - !((0x0007f <= unichar) && (0x0009f >= unichar)) && // DEL and C1 control - !((0x0fdd0 <= unichar) && (0x0fddf >= unichar)) && // noncharacters - !(0x0fffe == (unichar & 0x0ffff)) && // byte-order detection noncharacter - !(0x0ffff == (unichar & 0x0ffff)); // the other noncharacter - } - - template <std::size_t N> - bool append_char(char (&buffer)[N], std::size_t offset) const - { - auto const chlen = utf8_from_uchar(&buffer[offset], N - offset - 1, unichar); - if (0 < chlen) - { - buffer[offset + chlen] = '\0'; - return true; - } - else - { - return false; - } - } }; int top_line; // main box top line |