From ca8055657df312a5840ee718b178902afa2fc0ca Mon Sep 17 00:00:00 2001 From: dborth Date: Mon, 15 Mar 2010 23:19:32 +0000 Subject: [PATCH] prevent update notification from interfering with game loading --- source/ngc/filebrowser.cpp | 5 +++++ source/ngc/filebrowser.h | 1 + source/ngc/menu.cpp | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/ngc/filebrowser.cpp b/source/ngc/filebrowser.cpp index 2367c9b..643b079 100644 --- a/source/ngc/filebrowser.cpp +++ b/source/ngc/filebrowser.cpp @@ -39,6 +39,7 @@ static char szpath[MAXPATHLEN]; static bool inSz = false; char romFilename[256]; +bool loadingFile = false; /**************************************************************************** * autoLoadMethod() @@ -475,6 +476,8 @@ int BrowserLoadFile() // store the filename (w/o ext) - used for ram/state naming StripExt(romFilename, browserList[browser.selIndex].filename); + + loadingFile = true; if(!inSz) { @@ -493,6 +496,8 @@ int BrowserLoadFile() BrowserChangeFolder(); } } + + loadingFile = false; if (filesize <= 0) { diff --git a/source/ngc/filebrowser.h b/source/ngc/filebrowser.h index d25e5e5..4d8bbcf 100644 --- a/source/ngc/filebrowser.h +++ b/source/ngc/filebrowser.h @@ -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(); diff --git a/source/ngc/menu.cpp b/source/ngc/menu.cpp index 6e56f01..426acf0 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -303,7 +303,8 @@ UpdateGUI (void *arg) if(updateFound) { updateFound = false; - LWP_CreateThread (&updatethread, EmulatorUpdate, NULL, NULL, 0, 70); + if(!loadingFile) + LWP_CreateThread (&updatethread, EmulatorUpdate, NULL, NULL, 0, 70); } #endif