Update lua-engine.cpp
Previous changes were overridden by an accidental git pull, properly added Lua functionality to switch the disk and insert or eject a disk.
This commit is contained in:
parent
a620ac6d35
commit
2f06317068
|
@ -628,6 +628,23 @@ extern void ReloadRom(void);
|
|||
//}
|
||||
//#endif
|
||||
|
||||
// emu.switchDisk()
|
||||
// Switches the side of the disk that is currently ejected
|
||||
static int emu_switchDisk(lua_State* L)
|
||||
{
|
||||
static void FCEUI_FDSSelect();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// emu.insertOrEjectDisk()
|
||||
// If the disk is currently ejected, then insert it back into the FDS
|
||||
// If the disk is currently inserted into the FDS, eject it
|
||||
static int emu_insertOrEjectDisk(lua_State* L)
|
||||
{
|
||||
static void FCEUI_FDSInsert();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// emu.loadrom(string filename)
|
||||
//
|
||||
// Loads the rom from the directory relative to the lua script or from the absolute path.
|
||||
|
@ -6069,6 +6086,8 @@ static const struct luaL_reg emulib [] = {
|
|||
{"readonly", movie_getreadonly},
|
||||
{"setreadonly", movie_setreadonly},
|
||||
{"getdir", emu_getdir},
|
||||
{"switchDisk", emu_switchDisk},
|
||||
{"insertOrEjectDisk", emu_insertOrEjectDisk},
|
||||
{"loadrom", emu_loadrom},
|
||||
{"print", print}, // sure, why not
|
||||
{"exit", emu_exit}, // useful for run-and-close scripts
|
||||
|
|
Loading…
Reference in New Issue