diff --git a/src/drivers/sdl/gui.cpp b/src/drivers/sdl/gui.cpp index a6e78fc5..f7f03c84 100644 --- a/src/drivers/sdl/gui.cpp +++ b/src/drivers/sdl/gui.cpp @@ -938,21 +938,25 @@ void toggleSound(GtkWidget* check, gpointer data) void emuReset () { - ResetNES(); + if(isloaded) + ResetNES(); } void emuPause () { - FCEUI_SetEmulationPaused(1); + if(isloaded) + FCEUI_SetEmulationPaused(1); } void emuResume () { - FCEUI_SetEmulationPaused(0); + if(isloaded) + FCEUI_SetEmulationPaused(0); } void enableFullscreen () { - ToggleFS(); + if(isloaded) + ToggleFS(); } void recordMovie() { diff --git a/src/drivers/sdl/sdl.cpp b/src/drivers/sdl/sdl.cpp index b0db181a..f7ad824a 100644 --- a/src/drivers/sdl/sdl.cpp +++ b/src/drivers/sdl/sdl.cpp @@ -59,8 +59,7 @@ bool turbo = false; int CloseGame(void); -static int inited = 0; -static int isloaded = 0; +static int inited = 0; int eoptions=0; diff --git a/src/drivers/sdl/sdl.h b/src/drivers/sdl/sdl.h index 71ac2129..d1faaab7 100644 --- a/src/drivers/sdl/sdl.h +++ b/src/drivers/sdl/sdl.h @@ -7,6 +7,7 @@ #include "input.h" static void DoFun(int frameskip); +static int isloaded = 0; int LoadGame(const char *path); int CloseGame(void);