From dd1d40b9fd415fd08a8fdbbfa6fb4c9786c1e768 Mon Sep 17 00:00:00 2001 From: AJR Date: Sat, 31 Dec 2016 17:11:10 -0500 Subject: [PATCH] Fix for a potential problem if natural keyboard input gets disabled while machine is running (nw) --- src/emu/natkeyboard.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/emu/natkeyboard.cpp b/src/emu/natkeyboard.cpp index 3d71726a626..a5d856a20e9 100644 --- a/src/emu/natkeyboard.cpp +++ b/src/emu/natkeyboard.cpp @@ -372,7 +372,13 @@ void natural_keyboard::set_in_use(bool usage) for (auto &port : machine().ioport().ports()) for (ioport_field &field : port.second->fields()) if (field.type() == IPT_KEYBOARD) + { field.live().lockout = usage; + + // clear pressed status when going out of use + if (!usage) + field.set_value(0); + } } }