GTK: fixed segfaults when fullscreen would be called with no rom loaded

This commit is contained in:
punkrockguy318 2010-03-07 23:48:50 +00:00
parent a0924098ad
commit 7790de5fe3
3 changed files with 10 additions and 6 deletions

View File

@ -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()
{

View File

@ -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;

View File

@ -7,6 +7,7 @@
#include "input.h"
static void DoFun(int frameskip);
static int isloaded = 0;
int LoadGame(const char *path);
int CloseGame(void);