diff options
| author | 2017-09-05 03:27:45 -0400 | |
|---|---|---|
| committer | 2017-09-05 17:27:45 +1000 | |
| commit | 67ddfe302cdc18b356839797d166f7bfda4ce2af (patch) | |
| tree | 93482da6674f4c198b71fcc385e026e256e27b9a /src/emu/validity.cpp | |
| parent | 37db5be46434728fb830d73ace0e6969e57aa6f5 (diff) | |
Added a natural keyboard validation to check for valid natural keyboard (uni)codes (#2618)
Diffstat (limited to 'src/emu/validity.cpp')
| -rw-r--r-- | src/emu/validity.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index c621e222281..f5f139c38b7 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -1832,6 +1832,19 @@ void validity_checker::validate_inputs() for (ioport_setting &setting : field.settings()) if (!setting.condition().none()) validate_condition(setting.condition(), device, port_map); + + // verify natural keyboard codes + for (int which = 0; which < 1 << (UCHAR_SHIFT_END - UCHAR_SHIFT_BEGIN + 1); which++) + { + char32_t code = field.keyboard_code(which); + if (code && !uchar_isvalid(code)) + { + osd_printf_error("Field '%s' has non-character U+%04X in PORT_CHAR(%d)\n", + name, + (unsigned)code, + (int)code); + } + } } // done with this port |
