* Equivalent to repeating the last FCEU_LoadLuaCode() call. */
| 6561 | * Equivalent to repeating the last FCEU_LoadLuaCode() call. |
| 6562 | */ |
| 6563 | void 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 | /** |
nothing calls this directly
no test coverage detected