mirror of
https://github.com/holub/mame
synced 2025-04-26 18:23:08 +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 that doesn't work, convert to UTF-8
|
||||||
if (ch > 0x7F || isprint(ch))
|
if (ch > 0x7F || isprint(ch))
|
||||||
{
|
return utf8_from_uchar(ch);
|
||||||
char buf[10];
|
|
||||||
int count = utf8_from_uchar(buf, ARRAY_LENGTH(buf), ch);
|
|
||||||
buf[count] = 0;
|
|
||||||
return std::string(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
// otherwise, opt for question marks
|
// otherwise, opt for question marks
|
||||||
return "???";
|
return "???";
|
||||||
|
Loading…
Reference in New Issue
Block a user