Use LoadGame instead of FCEUI_LoadGame
This commit is contained in:
parent
ec72160f39
commit
432ffeeec2
|
@ -44,7 +44,7 @@ void LockConsole(void);
|
|||
void UnlockConsole(void);
|
||||
void ToggleFS(); /* SDL */
|
||||
|
||||
int LoadGame(const char *path);
|
||||
int LoadGame(const char *path, bool silent = false);
|
||||
int CloseGame(void);
|
||||
int GUI_Init(int argc, char **argv, int (*dofunc)(void));
|
||||
int GUI_Idle(void);
|
||||
|
|
|
@ -275,12 +275,12 @@ static void DoArgs(int argc, char *argv[])
|
|||
provides data necessary for the driver code(number of scanlines to
|
||||
render, what virtual input devices to use, etc.).
|
||||
*/
|
||||
int LoadGame(const char *path)
|
||||
int LoadGame(const char *path, bool silent)
|
||||
{
|
||||
FCEUGI *tmp;
|
||||
|
||||
CloseGame();
|
||||
if(!(tmp=FCEUI_LoadGame(path,1)))
|
||||
if(!(tmp=FCEUI_LoadGame(path,1,silent)))
|
||||
return 0;
|
||||
CurGame=tmp;
|
||||
ParseGI(tmp);
|
||||
|
|
|
@ -29,7 +29,7 @@ void LockConsole(void);
|
|||
void UnlockConsole(void);
|
||||
void ToggleFS(); /* SDL */
|
||||
|
||||
int LoadGame(const char *path);
|
||||
int LoadGame(const char *path, bool silent);
|
||||
//int CloseGame(void);
|
||||
|
||||
void Giggles(int);
|
||||
|
|
|
@ -206,10 +206,13 @@ DriverKill()
|
|||
inited=0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads last game
|
||||
*/
|
||||
int reloadLastGame() {
|
||||
std::string lastRom;
|
||||
g_config->getOption(std::string("SDL.LastOpenFile"), &lastRom);
|
||||
return LoadGame(lastRom.c_str());
|
||||
return LoadGame(lastRom.c_str(), false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -218,7 +221,7 @@ int reloadLastGame() {
|
|||
* provides data necessary for the driver code(number of scanlines to
|
||||
* render, what virtual input devices to use, etc.).
|
||||
*/
|
||||
int LoadGame(const char *path)
|
||||
int LoadGame(const char *path, bool silent)
|
||||
{
|
||||
int gg_enabled, autoLoadDebug, autoOpenDebugger;
|
||||
|
||||
|
@ -233,7 +236,7 @@ int LoadGame(const char *path)
|
|||
|
||||
FCEUI_SetGameGenie (gg_enabled);
|
||||
|
||||
if(!FCEUI_LoadGame(path, 1)) {
|
||||
if(!FCEUI_LoadGame(path, 1, silent)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ extern unsigned int gui_draw_area_height;
|
|||
// global configuration object
|
||||
extern Config *g_config;
|
||||
|
||||
int LoadGame(const char *path);
|
||||
int LoadGame(const char *path, bool silent = false);
|
||||
int CloseGame(void);
|
||||
|
||||
int fceuWrapperInit( int argc, char *argv[] );
|
||||
|
|
|
@ -24,7 +24,7 @@ extern int dendy;
|
|||
extern int pal_emulation;
|
||||
extern bool swapDuty;
|
||||
|
||||
int LoadGame(const char *path);
|
||||
int LoadGame(const char *path, bool silent);
|
||||
int CloseGame(void);
|
||||
void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count);
|
||||
uint64 FCEUD_GetTime();
|
||||
|
|
|
@ -29,7 +29,7 @@ void LockConsole(void);
|
|||
void UnlockConsole(void);
|
||||
void ToggleFS(); /* SDL */
|
||||
|
||||
int LoadGame(const char *path);
|
||||
int LoadGame(const char *path, bool silent);
|
||||
//int CloseGame(void);
|
||||
|
||||
void Giggles(int);
|
||||
|
|
|
@ -189,6 +189,9 @@ static void ShowUsage(char *prog)
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads last game.
|
||||
*/
|
||||
int reloadLastGame() {
|
||||
std::string lastRom;
|
||||
g_config->getOption(std::string("SDL.LastOpenFile"), &lastRom);
|
||||
|
@ -201,12 +204,12 @@ int reloadLastGame() {
|
|||
* provides data necessary for the driver code(number of scanlines to
|
||||
* render, what virtual input devices to use, etc.).
|
||||
*/
|
||||
int LoadGame(const char *path)
|
||||
int LoadGame(const char *path, bool silent)
|
||||
{
|
||||
if (isloaded){
|
||||
CloseGame();
|
||||
}
|
||||
if(!FCEUI_LoadGame(path, 1)) {
|
||||
if(!FCEUI_LoadGame(path, 1, silent)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ extern int dendy;
|
|||
extern int pal_emulation;
|
||||
extern bool swapDuty;
|
||||
|
||||
int LoadGame(const char *path);
|
||||
int LoadGame(const char *path, bool silent = false);
|
||||
int CloseGame(void);
|
||||
void FCEUD_Update(uint8 *XBuf, int32 *Buffer, int Count);
|
||||
uint64 FCEUD_GetTime();
|
||||
|
|
|
@ -520,6 +520,7 @@ static int emu_getdir(lua_State *L) {
|
|||
|
||||
|
||||
extern void ReloadRom(void);
|
||||
extern int LoadGame(const char*, bool);
|
||||
|
||||
// emu.loadrom(string filename)
|
||||
//
|
||||
|
@ -549,7 +550,7 @@ static int emu_loadrom(lua_State *L) {
|
|||
const char *nameo2 = luaL_checkstring(L,1);
|
||||
char nameo[2048];
|
||||
strncpy(nameo, nameo2, sizeof(nameo));
|
||||
if(!FCEUI_LoadGame(nameo, 0, true)) {
|
||||
if(!LoadGame(nameo, true)) {
|
||||
extern void reloadLastGame();
|
||||
reloadLastGame();
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue