Merge pull request #4 from Emu-gators/arturBekker

Artur bekker
This commit is contained in:
StevenPhang22 2022-11-26 11:51:30 -05:00 committed by GitHub
commit ba491fd538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 0 deletions

1
output/CloseEmu.lua Normal file
View File

@ -0,0 +1 @@
emu.exit()

View File

@ -0,0 +1 @@
emu.insertOrEjectDisk()

View File

@ -0,0 +1 @@
emu.switchDisk()

View File

@ -628,6 +628,24 @@ extern void ReloadRom(void);
//}
//#endif
// emu.switchDisk()
// Switches the side of the disk that is currently ejected
static int emu_switchDisk(lua_State* L)
{
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)
{
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 +6087,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