commit
b6518a038c
|
@ -404,7 +404,7 @@ int FDSLoad(const char *name, FCEUFILE *fp);
|
|||
int NSFLoad(const char *name, FCEUFILE *fp);
|
||||
|
||||
//char lastLoadedGameName [2048] = {0,}; // hack for movie WRAM clearing on record from poweron
|
||||
bool archiveManuallyCanceled;
|
||||
extern bool archiveManuallyCanceled;
|
||||
|
||||
//name should be UTF-8, hopefully, or else there may be trouble
|
||||
FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silent)
|
||||
|
|
|
@ -2711,15 +2711,22 @@ static int savestate_create_aliased(lua_State *L, bool newnumbering) {
|
|||
int which = -1;
|
||||
const char* path = NULL;
|
||||
bool hasArg = false;
|
||||
if (lua_gettop(L) >= 1) {
|
||||
|
||||
if (lua_gettop(L) >= 1)
|
||||
{
|
||||
hasArg = true;
|
||||
path = luaL_checkstring(L, 1);
|
||||
if(path == NULL) {
|
||||
|
||||
if(lua_isnumber(L,1))
|
||||
{
|
||||
which = luaL_checkinteger(L,1);
|
||||
if (which < 1 || which > 10) {
|
||||
luaL_error(L, "invalid player's savestate %d", which);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
path = luaL_checkstring(L, 1);
|
||||
}
|
||||
}
|
||||
|
||||
//lets use lua to allocate the memory, since it is effectively a memory pool.
|
||||
|
|
Loading…
Reference in New Issue