mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 11:19:17 +01:00
This commit is contained in:
parent
3281d68a07
commit
612e099480
@ -104,6 +104,8 @@ int CheatMenu(const char * gameID)
|
|||||||
w.Append(&backBtn);
|
w.Append(&backBtn);
|
||||||
w.Append(&createBtn);
|
w.Append(&createBtn);
|
||||||
w.Append(&chtBrowser);
|
w.Append(&chtBrowser);
|
||||||
|
mainWindow->SetState(STATE_DISABLED);
|
||||||
|
mainWindow->ChangeFocus(&w);
|
||||||
mainWindow->Append(&w);
|
mainWindow->Append(&w);
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
|
|
||||||
@ -160,6 +162,7 @@ int CheatMenu(const char * gameID)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
HaltGui();
|
HaltGui();
|
||||||
|
mainWindow->SetState(STATE_DEFAULT);
|
||||||
mainWindow->Remove(&w);
|
mainWindow->Remove(&w);
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
|
|
||||||
|
@ -2900,34 +2900,34 @@ int CodeDownload(const char *id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(IsNetworkInit() && ret >= 0) {
|
if(IsNetworkInit() && ret >= 0) {
|
||||||
FILE * pfile;
|
|
||||||
|
|
||||||
char txtpath[150];
|
char txtpath[150];
|
||||||
snprintf(txtpath, sizeof(txtpath), "%s%s.txt", Settings.TxtCheatcodespath,id);
|
snprintf(txtpath, sizeof(txtpath), "%s%s.txt", Settings.TxtCheatcodespath,id);
|
||||||
|
|
||||||
char codeurl[150];
|
char codeurl[150];
|
||||||
snprintf(codeurl, sizeof(codeurl), "http://usbgecko.com/codes/codes/R/%s.txt",id);
|
snprintf(codeurl, sizeof(codeurl), "http://usbgecko.com/codes/codes/R/%s.txt",id);
|
||||||
|
|
||||||
struct block file = downloadfile(codeurl);
|
struct block file = downloadfile(codeurl);
|
||||||
|
|
||||||
if (file.size == 333)
|
if (file.size == 333)
|
||||||
{
|
{
|
||||||
strcat(codeurl, " is not on the server.");
|
strcat(codeurl, " is not on the server.");
|
||||||
|
|
||||||
WindowPrompt(tr("Error"),codeurl,"Ok");
|
WindowPrompt(tr("Error"),codeurl,"Ok");
|
||||||
ret =-1;
|
ret =-1;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(file.data != NULL){
|
if(file.data != NULL){
|
||||||
|
FILE * pfile;
|
||||||
pfile = fopen(txtpath, "wb");
|
pfile = fopen(txtpath, "wb");
|
||||||
fwrite(file.data,1,file.size,pfile);
|
fwrite(file.data,1,file.size,pfile);
|
||||||
fclose(pfile);
|
fclose(pfile);
|
||||||
free(file.data);
|
free(file.data);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
strcat(txtpath, " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information.");
|
strcat(txtpath, " has been Saved. The text has not been verified. Some of the code may not work right with each other. If you experience trouble, open the text in a real text editor for more information.");
|
||||||
|
|
||||||
WindowPrompt(0,txtpath,"Ok");
|
WindowPrompt(0,txtpath,"Ok");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2937,7 +2937,6 @@ int CodeDownload(const char *id)
|
|||||||
ret =-1;
|
ret =-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CloseConnection();
|
CloseConnection();
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
|
Loading…
Reference in New Issue
Block a user