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; static bool inSz = false;
char romFilename[256]; char romFilename[256];
bool loadingFile = false;
/**************************************************************************** /****************************************************************************
* autoLoadMethod() * autoLoadMethod()
@ -475,6 +476,8 @@ int BrowserLoadFile()
// store the filename (w/o ext) - used for ram/state naming // store the filename (w/o ext) - used for ram/state naming
StripExt(romFilename, browserList[browser.selIndex].filename); StripExt(romFilename, browserList[browser.selIndex].filename);
loadingFile = true;
if(!inSz) if(!inSz)
{ {
@ -493,6 +496,8 @@ int BrowserLoadFile()
BrowserChangeFolder(); BrowserChangeFolder();
} }
} }
loadingFile = false;
if (filesize <= 0) if (filesize <= 0)
{ {

View File

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

View File

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