diff options
author | 2023-02-24 19:31:12 +1100 | |
---|---|---|
committer | 2023-02-24 19:31:12 +1100 | |
commit | 65aeb63a2a1f4f65a6fa0dedabba1b852a189f96 (patch) | |
tree | 42a56bcf4d22b624dbb117946e376981e691a5f0 /src/frontend/mame/ui/devopt.cpp | |
parent | 3b5dbeea3bad50ad04c966de4afffb864a9856d0 (diff) |
Update accumulating relative inputs exactly once per frame.
This fixes "amplification" effects that would happen if the frame rate
rose above 100 Hz (whether by unthrottling or otherwise).
Synchronise with wall clock any time inputs are read. Not doing this
has weird effects on relative inputs with frame skipping and contributes
to unresponsiveness of menus.
Reduce visual latency for mouse movement on menus when paused or
skipping frames. The rest of the code changes to menus won't provide
benefits until draw can happen after event handling.
Diffstat (limited to 'src/frontend/mame/ui/devopt.cpp')
-rw-r--r-- | src/frontend/mame/ui/devopt.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/frontend/mame/ui/devopt.cpp b/src/frontend/mame/ui/devopt.cpp index 9886c4e941d..0e9b44a25fc 100644 --- a/src/frontend/mame/ui/devopt.cpp +++ b/src/frontend/mame/ui/devopt.cpp @@ -359,10 +359,12 @@ void menu_device_config::populate() { } -void menu_device_config::handle(event const *ev) +bool menu_device_config::handle(event const *ev) { if (ev) - handle_key(ev->iptkey); + return handle_key(ev->iptkey); + else + return false; } } // namespace ui |