From d334f777e8b8a1f024cb8350a1133946b442cbc4 Mon Sep 17 00:00:00 2001 From: dborth Date: Mon, 15 Mar 2010 23:18:55 +0000 Subject: [PATCH] prevent update notification from interfering with game loading --- source/ngc/filebrowser.cpp | 3 +++ source/ngc/filebrowser.h | 1 + source/ngc/menu.cpp | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/source/ngc/filebrowser.cpp b/source/ngc/filebrowser.cpp index 49b6a72..cc21428 100644 --- a/source/ngc/filebrowser.cpp +++ b/source/ngc/filebrowser.cpp @@ -39,6 +39,7 @@ bool inSz = false; char ROMFilename[512]; bool ROMLoaded = false; +bool loadingFile = false; /**************************************************************************** * autoLoadMethod() @@ -477,7 +478,9 @@ int BrowserLoadFile() // store the filename (w/o ext) - used for sram/freeze naming StripExt(ROMFilename, browserList[browser.selIndex].filename); + loadingFile = true; ROMLoaded = LoadVBAROM(); + loadingFile = false; if (!ROMLoaded) { diff --git a/source/ngc/filebrowser.h b/source/ngc/filebrowser.h index 5af9674..bd47fc6 100644 --- a/source/ngc/filebrowser.h +++ b/source/ngc/filebrowser.h @@ -40,6 +40,7 @@ extern BROWSERINFO browser; extern BROWSERENTRY * browserList; extern char ROMFilename[512]; extern bool ROMLoaded; +extern bool loadingFile; extern char szpath[MAXPATHLEN]; extern bool inSz; diff --git a/source/ngc/menu.cpp b/source/ngc/menu.cpp index e0b14b9..f6c6766 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -288,7 +288,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