summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/uiinput.cpp
diff options
context:
space:
mode:
author Vas Crabb <cuavas@users.noreply.github.com>2023-03-25 05:53:58 +1100
committer GitHub <noreply@github.com>2023-03-25 05:53:58 +1100
commit5f97af903c8bc7e3d4d031c9794cd620d3b2af98 (patch)
tree0052d342c46aee33333b25f3da53c9683c92b8b7 /src/emu/uiinput.cpp
parentfbb67a2764e26c03821e66f896b5417a2bfe682e (diff)
-Lua engine: run everything in coroutines. (#11019)
* This lets you use emu.wait(...) directly without mucking around creating coroutines. * Allow emu.wait to accept an attotime argument. * Added a couple more wait helper functions. -emu/profiler.h: Actually use scope-based profiling helpers. * This makes the comment at the top of emu/profile.h less dishonest, and makes it easier to write exception-safe code. * Got rid of some do { ... } while (0) loops that only existed so break could be used like a goto.
Diffstat (limited to 'src/emu/uiinput.cpp')
-rw-r--r--src/emu/uiinput.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/emu/uiinput.cpp b/src/emu/uiinput.cpp
index 02bf1f2aa31..138bf67055d 100644
--- a/src/emu/uiinput.cpp
+++ b/src/emu/uiinput.cpp
@@ -254,7 +254,7 @@ bool ui_input_manager::pressed_repeat(int code, int speed)
{
bool pressed;
-g_profiler.start(PROFILER_INPUT);
+ auto profile = g_profiler.start(PROFILER_INPUT);
/* get the status of this key (assumed to be only in the defaults) */
assert(code > IPT_UI_FIRST && code < IPT_UI_LAST);
@@ -289,8 +289,6 @@ g_profiler.start(PROFILER_INPUT);
else
m_next_repeat[code] = 0;
-g_profiler.stop();
-
return pressed;
}