fix update window causing crash, misc tweaks

This commit is contained in:
dborth 2009-05-30 18:32:24 +00:00
parent 83a1f38626
commit c04fcf573f
3 changed files with 31 additions and 22 deletions

View File

@ -85,7 +85,7 @@ HaltDeviceThread()
* This checks our devices for changes (SD/USB removed) and
* initializes the network in the background
***************************************************************************/
static int devsleep = 3*1000*1000;
static int devsleep = 1*1000*1000;
static void *
devicecallback (void *arg)

View File

@ -102,6 +102,11 @@ ResumeGui()
static void
HaltGui()
{
#ifdef HW_RVL
if(updatethread != LWP_THREAD_NULL)
LWP_JoinThread(updatethread, NULL);
#endif
guiHalt = true;
// wait for thread to finish
@ -227,7 +232,6 @@ WindowPrompt(const char *title, const char *msg, const char *btn1Label, const ch
static void *
EmulatorUpdate (void *arg)
{
sleep(3);
bool installUpdate = WindowPrompt(
"Update Available",
"An update is available!",

View File

@ -183,9 +183,8 @@ void InitializeNetwork(bool silent)
while(inNetworkInit) // a network init is already in progress!
usleep(50);
if(networkInit) // check again if the network was inited
return;
if(!networkInit) // check again if the network was inited
{
inNetworkInit = true;
char ip[16];
@ -209,6 +208,9 @@ void InitializeNetwork(bool silent)
}
inNetworkInit = false;
}
if(!silent)
CancelAction();
}
void CloseShare()
{
@ -277,6 +279,9 @@ ConnectShare (bool silent)
{
networkShareInit = true;
}
if(!silent)
CancelAction();
}
if(!networkShareInit && !silent)