MCPcopy Create free account
hub / github.com/TASEmulators/fceux / FCEU_ReloadLuaCode

Function FCEU_ReloadLuaCode

src/lua-engine.cpp:6563–6587  ·  view source on GitHub ↗

* Equivalent to repeating the last FCEU_LoadLuaCode() call. */

Source from the content-addressed store, hash-verified

6561 * Equivalent to repeating the last FCEU_LoadLuaCode() call.
6562 */
6563void FCEU_ReloadLuaCode()
6564{
6565 if (!luaScriptName)
6566 {
6567#ifdef __WIN_DRIVER__
6568 // no script currently running, then try loading the most recent
6569 extern char *recent_lua[];
6570 char*& fname = recent_lua[0];
6571 extern void UpdateLuaConsole(const char* fname);
6572 if (fname)
6573 {
6574 UpdateLuaConsole(fname);
6575 FCEU_LoadLuaCode(fname);
6576 } else
6577 {
6578 FCEU_DispMessage("There's no script to reload.", 0);
6579 }
6580#else
6581 FCEU_DispMessage("There's no script to reload.", 0);
6582#endif
6583 } else
6584 {
6585 FCEU_LoadLuaCode(luaScriptName);
6586 }
6587}
6588
6589
6590/**

Callers

nothing calls this directly

Calls 3

UpdateLuaConsoleFunction · 0.85
FCEU_LoadLuaCodeFunction · 0.85
FCEU_DispMessageFunction · 0.85

Tested by

no test coverage detected