mirror of
https://github.com/holub/mame
synced 2025-06-20 03:06:39 +03:00
Merge pull request #5565 from npwoods/lua_exit_and_hard_reset_pending
Exposing running_machine::exit_pending() and running_machine::hard_reset_pending() to LUA
This commit is contained in:
commit
c8cde9b1e3
@ -193,6 +193,7 @@ public:
|
|||||||
machine_phase phase() const { return m_current_phase; }
|
machine_phase phase() const { return m_current_phase; }
|
||||||
bool paused() const { return m_paused || (m_current_phase != machine_phase::RUNNING); }
|
bool paused() const { return m_paused || (m_current_phase != machine_phase::RUNNING); }
|
||||||
bool exit_pending() const { return m_exit_pending; }
|
bool exit_pending() const { return m_exit_pending; }
|
||||||
|
bool hard_reset_pending() const { return m_hard_reset_pending; }
|
||||||
bool ui_active() const { return m_ui_active; }
|
bool ui_active() const { return m_ui_active; }
|
||||||
const char *basename() const { return m_basename.c_str(); }
|
const char *basename() const { return m_basename.c_str(); }
|
||||||
int sample_rate() const { return m_sample_rate; }
|
int sample_rate() const { return m_sample_rate; }
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
// copyright-holders:Miodrag Milanovic,Luca Bruno
|
// copyright-holders:Miodrag Milanovic,Luca Bruno
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
||||||
luaengine.c
|
luaengine.cpp
|
||||||
|
|
||||||
Controls execution of the core MAME system.
|
Controls execution of the core MAME system.
|
||||||
|
|
||||||
@ -1247,6 +1247,8 @@ void lua_engine::initialize()
|
|||||||
*
|
*
|
||||||
* machine.paused - get paused state
|
* machine.paused - get paused state
|
||||||
* machine.samplerate - get audio sample rate
|
* machine.samplerate - get audio sample rate
|
||||||
|
* machine.exit_pending
|
||||||
|
* machine.hard_reset_pending
|
||||||
*
|
*
|
||||||
* machine.devices[] - get device table (k=tag, v=device_t)
|
* machine.devices[] - get device table (k=tag, v=device_t)
|
||||||
* machine.screens[] - get screens table (k=tag, v=screen_device)
|
* machine.screens[] - get screens table (k=tag, v=screen_device)
|
||||||
@ -1277,6 +1279,8 @@ void lua_engine::initialize()
|
|||||||
},
|
},
|
||||||
"paused", sol::property(&running_machine::paused),
|
"paused", sol::property(&running_machine::paused),
|
||||||
"samplerate", sol::property(&running_machine::sample_rate),
|
"samplerate", sol::property(&running_machine::sample_rate),
|
||||||
|
"exit_pending", sol::property(&running_machine::exit_pending),
|
||||||
|
"hard_reset_pending", sol::property(&running_machine::hard_reset_pending),
|
||||||
"devices", sol::property([this](running_machine &m) {
|
"devices", sol::property([this](running_machine &m) {
|
||||||
std::function<void(device_t &, sol::table)> tree;
|
std::function<void(device_t &, sol::table)> tree;
|
||||||
sol::table table = sol().create_table();
|
sol::table table = sol().create_table();
|
||||||
|
Loading…
Reference in New Issue
Block a user