prevent update notification from interfering with game loading

This commit is contained in:
dborth 2010-03-15 23:19:32 +00:00
parent 53936427f7
commit ca8055657d
3 changed files with 8 additions and 1 deletions

View File

@ -39,6 +39,7 @@ static char szpath[MAXPATHLEN];
static bool inSz = false;
char romFilename[256];
bool loadingFile = false;
/****************************************************************************
* autoLoadMethod()
@ -476,6 +477,8 @@ int BrowserLoadFile()
// store the filename (w/o ext) - used for ram/state naming
StripExt(romFilename, browserList[browser.selIndex].filename);
loadingFile = true;
if(!inSz)
{
if(!MakeFilePath(filepath, FILE_ROM))
@ -494,6 +497,8 @@ int BrowserLoadFile()
}
}
loadingFile = false;
if (filesize <= 0)
{
ErrorPrompt("Error loading ROM!");

View File

@ -50,6 +50,7 @@ enum
};
extern char romFilename[];
extern bool loadingFile;
bool MakeFilePath(char filepath[], int type, char * filename = NULL, int filenum = -2);
int UpdateDirName();

View File

@ -303,6 +303,7 @@ UpdateGUI (void *arg)
if(updateFound)
{
updateFound = false;
if(!loadingFile)
LWP_CreateThread (&updatethread, EmulatorUpdate, NULL, NULL, 0, 70);
}
#endif