mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-25 20:16:53 +01:00
minor changes
This commit is contained in:
parent
173bad8c6f
commit
fb0ed2eb65
@ -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);
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user