mirror of
https://github.com/holub/mame
synced 2025-05-21 13:18:56 +03:00
luaengine: add emu.pause()/unpause() methods
Signed-off-by: Luca Bruno <lucab@debian.org>
This commit is contained in:
parent
3e9773574e
commit
08fdec9674
@ -216,6 +216,22 @@ int lua_engine::l_emu_romname(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// emu_pause/emu_unpause - pause/unpause game
|
||||
//-------------------------------------------------
|
||||
|
||||
int lua_engine::l_emu_pause(lua_State *L)
|
||||
{
|
||||
luaThis->machine().pause();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_engine::l_emu_unpause(lua_State *L)
|
||||
{
|
||||
luaThis->machine().resume();
|
||||
return 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// emu_keypost - post keys to natural keyboard
|
||||
//-------------------------------------------------
|
||||
@ -514,6 +530,8 @@ void lua_engine::initialize()
|
||||
.addCFunction ("after", l_emu_after )
|
||||
.addCFunction ("exit", l_emu_exit )
|
||||
.addCFunction ("start", l_emu_start )
|
||||
.addCFunction ("pause", l_emu_pause )
|
||||
.addCFunction ("unpause", l_emu_unpause )
|
||||
.beginClass <machine_manager> ("manager")
|
||||
.addFunction ("machine", &machine_manager::machine)
|
||||
.addFunction ("options", &machine_manager::options)
|
||||
|
@ -84,6 +84,8 @@ private:
|
||||
static int l_emu_hook_output(lua_State *L);
|
||||
static int l_emu_exit(lua_State *L);
|
||||
static int l_emu_start(lua_State *L);
|
||||
static int l_emu_pause(lua_State *L);
|
||||
static int l_emu_unpause(lua_State *L);
|
||||
|
||||
void resume(void *L, INT32 param);
|
||||
void report_errors(int status);
|
||||
|
Loading…
Reference in New Issue
Block a user