mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
Using a better overload of utf8_from_uchar() in ioport_field::key_name (nw)
This commit is contained in:
parent
4a422c0495
commit
3f24d4173c
@ -841,12 +841,7 @@ std::string ioport_field::key_name(int which) const
|
||||
|
||||
// if that doesn't work, convert to UTF-8
|
||||
if (ch > 0x7F || isprint(ch))
|
||||
{
|
||||
char buf[10];
|
||||
int count = utf8_from_uchar(buf, ARRAY_LENGTH(buf), ch);
|
||||
buf[count] = 0;
|
||||
return std::string(buf);
|
||||
}
|
||||
return utf8_from_uchar(ch);
|
||||
|
||||
// otherwise, opt for question marks
|
||||
return "???";
|
||||
|
Loading…
Reference in New Issue
Block a user