mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-01 08:25:12 +01:00
minor changes
This commit is contained in:
parent
173bad8c6f
commit
fb0ed2eb65
@ -121,6 +121,9 @@ void ResetText()
|
|||||||
int
|
int
|
||||||
WindowPrompt(const char *title, const char *msg, const char *btn1Label, const char *btn2Label)
|
WindowPrompt(const char *title, const char *msg, const char *btn1Label, const char *btn2Label)
|
||||||
{
|
{
|
||||||
|
if(!mainWindow || ExitRequested || ShutdownRequested)
|
||||||
|
return 0;
|
||||||
|
|
||||||
int choice = -1;
|
int choice = -1;
|
||||||
|
|
||||||
GuiWindow promptWindow(448,288);
|
GuiWindow promptWindow(448,288);
|
||||||
|
@ -46,21 +46,27 @@ bool updateFound = false; // true if an app update was found
|
|||||||
|
|
||||||
void UpdateCheck()
|
void UpdateCheck()
|
||||||
{
|
{
|
||||||
// we can only check for the update if we have internet + SD
|
// we only check for an update if we have internet + SD/USB
|
||||||
if(!updateChecked && networkInit && (isMounted[DEVICE_SD] || isMounted[DEVICE_USB]))
|
if(updateChecked || !networkInit)
|
||||||
{
|
return;
|
||||||
|
|
||||||
|
if(!isMounted[DEVICE_SD] && !isMounted[DEVICE_USB])
|
||||||
|
return;
|
||||||
|
|
||||||
updateChecked = true;
|
updateChecked = true;
|
||||||
u8 tmpbuffer[256];
|
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 *xml;
|
||||||
mxml_node_t *item;
|
mxml_node_t *item;
|
||||||
|
|
||||||
xml = mxmlLoadString(NULL, (char *)tmpbuffer, MXML_TEXT_CALLBACK);
|
xml = mxmlLoadString(NULL, (char *)tmpbuffer, MXML_TEXT_CALLBACK);
|
||||||
|
|
||||||
if(xml)
|
if(!xml)
|
||||||
{
|
return;
|
||||||
|
|
||||||
// check settings version
|
// check settings version
|
||||||
item = mxmlFindElement(xml, xml, "app", "version", NULL, MXML_DESCEND);
|
item = mxmlFindElement(xml, xml, "app", "version", NULL, MXML_DESCEND);
|
||||||
if(item) // a version entry exists
|
if(item) // a version entry exists
|
||||||
@ -99,9 +105,6 @@ void UpdateCheck()
|
|||||||
}
|
}
|
||||||
mxmlDelete(xml);
|
mxmlDelete(xml);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool unzipArchive(char * zipfilepath, char * unzipfolderpath)
|
static bool unzipArchive(char * zipfilepath, char * unzipfolderpath)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user