minor changes

This commit is contained in:
dborth 2010-07-27 17:30:12 +00:00
parent 173bad8c6f
commit fb0ed2eb65
2 changed files with 49 additions and 43 deletions

View File

@ -121,6 +121,9 @@ void ResetText()
int
WindowPrompt(const char *title, const char *msg, const char *btn1Label, const char *btn2Label)
{
if(!mainWindow || ExitRequested || ShutdownRequested)
return 0;
int choice = -1;
GuiWindow promptWindow(448,288);

View File

@ -46,21 +46,27 @@ bool updateFound = false; // true if an app update was found
void UpdateCheck()
{
// we can only check for the update if we have internet + SD
if(!updateChecked && networkInit && (isMounted[DEVICE_SD] || isMounted[DEVICE_USB]))
{
// we only check for an update if we have internet + SD/USB
if(updateChecked || !networkInit)
return;
if(!isMounted[DEVICE_SD] && !isMounted[DEVICE_USB])
return;
updateChecked = true;
u8 tmpbuffer[256];
if (http_request("http://vba-wii.googlecode.com/svn/trunk/update.xml", NULL, tmpbuffer, 256, SILENT) > 0)
{
if (http_request("http://vba-wii.googlecode.com/svn/trunk/update.xml", NULL, tmpbuffer, 256, SILENT) <= 0)
return;
mxml_node_t *xml;
mxml_node_t *item;
xml = mxmlLoadString(NULL, (char *)tmpbuffer, MXML_TEXT_CALLBACK);
if(xml)
{
if(!xml)
return;
// check settings version
item = mxmlFindElement(xml, xml, "app", "version", NULL, MXML_DESCEND);
if(item) // a version entry exists
@ -99,9 +105,6 @@ void UpdateCheck()
}
mxmlDelete(xml);
}
}
}
}
static bool unzipArchive(char * zipfilepath, char * unzipfolderpath)
{