summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-02-23 06:33:22 +1100
committer Vas Crabb <vas@vastheman.com>2023-02-23 06:33:22 +1100
commit98131a6b9e152661ff55b4e2f5355b0f1fe9b7e3 (patch)
tree0ab8052445cecd76085fe94711f54b7dc8ebf409 /src/frontend/mame/ui
parent14d00bf2f75173a05e05b16bb8ab2b82df2c6462 (diff)
osd: Cleaner way of dealing with input updates.
Diffstat (limited to 'src/frontend/mame/ui')
-rw-r--r--src/frontend/mame/ui/menu.cpp5
-rw-r--r--src/frontend/mame/ui/ui.cpp3
-rw-r--r--src/frontend/mame/ui/viewgfx.cpp5
3 files changed, 13 insertions, 0 deletions
diff --git a/src/frontend/mame/ui/menu.cpp b/src/frontend/mame/ui/menu.cpp
index 1f00a882a9a..c945b3f0297 100644
--- a/src/frontend/mame/ui/menu.cpp
+++ b/src/frontend/mame/ui/menu.cpp
@@ -25,6 +25,8 @@
#include "rendutil.h"
#include "uiinput.h"
+#include "osdepend.h"
+
#include <algorithm>
#include <cassert>
#include <cmath>
@@ -1250,6 +1252,9 @@ void menu::validate_selection(int scandir)
void menu::do_handle()
{
+ // let OSD do its thing
+ machine().osd().check_osd_inputs();
+
// recompute metrics if necessary
render_manager &render(machine().render());
render_target &target(render.ui_target());
diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp
index 8f04ae7b980..fc7c6f43298 100644
--- a/src/frontend/mame/ui/ui.cpp
+++ b/src/frontend/mame/ui/ui.cpp
@@ -1239,6 +1239,9 @@ void mame_ui_manager::image_handler_ingame()
uint32_t mame_ui_manager::handler_ingame(render_container &container)
{
+ // let the OSD do its thing first
+ machine().osd().check_osd_inputs();
+
bool is_paused = machine().paused();
// first draw the FPS counter
diff --git a/src/frontend/mame/ui/viewgfx.cpp b/src/frontend/mame/ui/viewgfx.cpp
index 56dfd008893..4c57e569e10 100644
--- a/src/frontend/mame/ui/viewgfx.cpp
+++ b/src/frontend/mame/ui/viewgfx.cpp
@@ -21,6 +21,8 @@
#include "util/unicode.h"
+#include "osdepend.h"
+
#include <cmath>
#include <vector>
@@ -56,6 +58,9 @@ public:
if (!is_relevant())
return cancel(uistate);
+ // let the OSD do its thing
+ mui.machine().osd().check_osd_inputs();
+
// always mark the bitmap dirty if not paused
if (!m_machine.paused())
m_bitmap_dirty = true;