mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-19 17:59:16 +01:00
This commit is contained in:
parent
772a60131d
commit
d32d1aa6f6
@ -58,6 +58,7 @@ main(int argc, char *argv[])
|
|||||||
else if(!strncasecmp(argv[0], "sd:/", 4))
|
else if(!strncasecmp(argv[0], "sd:/", 4))
|
||||||
bootDevice_found = true;
|
bootDevice_found = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!bootDevice_found)
|
if(!bootDevice_found)
|
||||||
{
|
{
|
||||||
//try USB
|
//try USB
|
||||||
@ -71,10 +72,12 @@ main(int argc, char *argv[])
|
|||||||
ret2 = IOS_ReloadIOS(222);
|
ret2 = IOS_ReloadIOS(222);
|
||||||
load_ehc_module();
|
load_ehc_module();
|
||||||
}
|
}
|
||||||
|
|
||||||
SDCard_Init(); // mount SD for loading cfg's
|
SDCard_Init(); // mount SD for loading cfg's
|
||||||
USBDevice_Init(); // and mount USB:/
|
USBDevice_Init(); // and mount USB:/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
gettextCleanUp();
|
gettextCleanUp();
|
||||||
CFG_Load();
|
CFG_Load();
|
||||||
|
|
||||||
|
@ -287,6 +287,8 @@ int autoSelectDol(const char *id)
|
|||||||
if (strcmp(id,"RBOE69") == 0) return 675;//starstremr
|
if (strcmp(id,"RBOE69") == 0) return 675;//starstremr
|
||||||
|
|
||||||
if (strcmp(id,"RPYP9B") == 0) return 12490;//from isostar
|
if (strcmp(id,"RPYP9B") == 0) return 12490;//from isostar
|
||||||
|
|
||||||
|
if (strcmp(id,"RM2X69") == 0)return 601;//dj_skual
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -303,6 +305,8 @@ Grand Slam R5TP69 1493
|
|||||||
|
|
||||||
rboe69 = boogie ntsc = (675)
|
rboe69 = boogie ntsc = (675)
|
||||||
|
|
||||||
|
601 rm2x69
|
||||||
|
|
||||||
RZTE01 = WSR = 674
|
RZTE01 = WSR = 674
|
||||||
|
|
||||||
Fifa08 RF8P69 463
|
Fifa08 RF8P69 463
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "filebrowser.h"
|
#include "filebrowser.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
|
||||||
|
#include "listfiles.h"
|
||||||
#include "language/gettext.h"
|
#include "language/gettext.h"
|
||||||
#include "PromptWindows.h"
|
#include "PromptWindows.h"
|
||||||
#include "libwiigui/gui.h"
|
#include "libwiigui/gui.h"
|
||||||
@ -301,7 +302,16 @@ main:
|
|||||||
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
|
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
|
||||||
GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
|
GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, SOUND_PCM, Settings.sfxvolume);
|
||||||
|
|
||||||
GuiImageData btnOutline(button_dialogue_box_png);
|
GuiImageData folderImgData(folder_png);
|
||||||
|
GuiImage folderImg(&folderImgData);
|
||||||
|
GuiButton folderBtn(folderImg.GetWidth(), folderImg.GetHeight());
|
||||||
|
folderBtn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
|
folderBtn.SetPosition(-210, -145);
|
||||||
|
folderBtn.SetImage(&folderImg);
|
||||||
|
folderBtn.SetTrigger(&trigA);
|
||||||
|
folderBtn.SetEffectGrow();
|
||||||
|
|
||||||
|
GuiImageData btnOutline(button_dialogue_box_png);
|
||||||
GuiText ExitBtnTxt("Cancel", 24, (GXColor){0, 0, 0, 255});
|
GuiText ExitBtnTxt("Cancel", 24, (GXColor){0, 0, 0, 255});
|
||||||
GuiImage ExitBtnImg(&btnOutline);
|
GuiImage ExitBtnImg(&btnOutline);
|
||||||
if (Settings.wsprompt == yes){
|
if (Settings.wsprompt == yes){
|
||||||
@ -316,6 +326,19 @@ main:
|
|||||||
ExitBtn.SetTrigger(&trigB);
|
ExitBtn.SetTrigger(&trigB);
|
||||||
ExitBtn.SetEffectGrow();
|
ExitBtn.SetEffectGrow();
|
||||||
|
|
||||||
|
GuiText usbBtnTxt((curDivice==SD?"USB":"SD"), 24, (GXColor){0, 0, 0, 255});
|
||||||
|
GuiImage usbBtnImg(&btnOutline);
|
||||||
|
if (Settings.wsprompt == yes){
|
||||||
|
usbBtnTxt.SetWidescreen(CFG.widescreen);
|
||||||
|
usbBtnImg.SetWidescreen(CFG.widescreen);
|
||||||
|
}GuiButton usbBtn(btnOutline.GetWidth(), btnOutline.GetHeight());
|
||||||
|
usbBtn.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
|
||||||
|
usbBtn.SetPosition(0, -35);
|
||||||
|
usbBtn.SetLabel(&usbBtnTxt);
|
||||||
|
usbBtn.SetImage(&usbBtnImg);
|
||||||
|
usbBtn.SetTrigger(&trigA);
|
||||||
|
usbBtn.SetEffectGrow();
|
||||||
|
|
||||||
GuiText okBtnTxt(tr("Ok"), 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
GuiText okBtnTxt(tr("Ok"), 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
|
||||||
GuiImage okBtnImg(&btnOutline);
|
GuiImage okBtnImg(&btnOutline);
|
||||||
if (Settings.wsprompt == yes){
|
if (Settings.wsprompt == yes){
|
||||||
@ -353,7 +376,8 @@ main:
|
|||||||
w.Append(&fileBrowser);
|
w.Append(&fileBrowser);
|
||||||
w.Append(&Adressbar);
|
w.Append(&Adressbar);
|
||||||
w.Append(&okBtn);
|
w.Append(&okBtn);
|
||||||
// w.Append(&deviceBtn);//i got codedump when i tried to make an extra button so i took this one out for now till i find the dump
|
w.Append(&folderBtn);
|
||||||
|
w.Append(&usbBtn);
|
||||||
mainWindow->Append(&w);
|
mainWindow->Append(&w);
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
|
|
||||||
@ -405,20 +429,42 @@ main:
|
|||||||
}
|
}
|
||||||
if(okBtn.GetState() == STATE_CLICKED)
|
if(okBtn.GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
/*int e=0;
|
|
||||||
for(unsigned int d=0;d<strlen(var);d++)
|
|
||||||
{
|
|
||||||
if (d!=3)
|
|
||||||
{
|
|
||||||
currentdir[e]=var[d];
|
|
||||||
e++;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
//snprintf(var,sizeof(currentdir),"%s", currentdir);
|
|
||||||
//snprintf(var,sizeof(var),"%s%s", browser.rootdir, browser.dir);
|
|
||||||
result = 1;
|
result = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if(usbBtn.GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
|
HaltGui();
|
||||||
|
mainWindow->Remove(&w);
|
||||||
|
ResumeGui();
|
||||||
|
result = BrowseDevice(var, (curDivice==SD?USB:SD));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if(folderBtn.GetState() == STATE_CLICKED)
|
||||||
|
{
|
||||||
|
HaltGui();
|
||||||
|
mainWindow->Remove(&w);
|
||||||
|
ResumeGui();
|
||||||
|
char newfolder[100];
|
||||||
|
sprintf(newfolder,"%s/",var);
|
||||||
|
|
||||||
|
int result = OnScreenKeyboard(newfolder,100,0);
|
||||||
|
if ( result == 1 )
|
||||||
|
{
|
||||||
|
int len = (strlen(newfolder)-1);
|
||||||
|
if(newfolder[len] !='/')
|
||||||
|
strncat (newfolder, "/", 1);
|
||||||
|
|
||||||
|
struct stat st;
|
||||||
|
if(stat(newfolder, &st) != 0) {
|
||||||
|
if(subfoldercreate(newfolder) != 1) {
|
||||||
|
WindowPrompt(tr("Error !"),tr("Can't create directory"),tr("OK"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = BrowseDevice(var, (curDivice==SD?SD:USB));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
HaltGui();
|
HaltGui();
|
||||||
|
@ -1280,9 +1280,11 @@ int MenuSettings()
|
|||||||
w.Remove(&backBtn);
|
w.Remove(&backBtn);
|
||||||
char entered[43] = "";
|
char entered[43] = "";
|
||||||
strncpy(entered, Settings.covers_path, sizeof(entered));
|
strncpy(entered, Settings.covers_path, sizeof(entered));
|
||||||
int result = BrowseDevice(entered);
|
titleTxt.SetText(tr("Cover Path"));
|
||||||
|
int result = BrowseDevice(entered);
|
||||||
//int result = OnScreenKeyboard(entered,43,0);
|
//int result = OnScreenKeyboard(entered,43,0);
|
||||||
w.Append(&optionBrowser2);
|
titleTxt.SetText(tr("Custom Paths"));
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
w.Append(&backBtn);
|
w.Append(&backBtn);
|
||||||
if ( result == 1 )
|
if ( result == 1 )
|
||||||
{
|
{
|
||||||
@ -1307,9 +1309,11 @@ int MenuSettings()
|
|||||||
w.Remove(&backBtn);
|
w.Remove(&backBtn);
|
||||||
char entered[43] = "";
|
char entered[43] = "";
|
||||||
strncpy(entered, Settings.disc_path, sizeof(entered));
|
strncpy(entered, Settings.disc_path, sizeof(entered));
|
||||||
int result = BrowseDevice(entered);
|
titleTxt.SetText(tr("Disc Path"));
|
||||||
|
int result = BrowseDevice(entered);
|
||||||
//int result = OnScreenKeyboard(entered, 43,0);
|
//int result = OnScreenKeyboard(entered, 43,0);
|
||||||
w.Append(&optionBrowser2);
|
titleTxt.SetText(tr("Custom Paths"));
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
w.Append(&backBtn);
|
w.Append(&backBtn);
|
||||||
if ( result == 1 )
|
if ( result == 1 )
|
||||||
{
|
{
|
||||||
@ -1333,7 +1337,8 @@ int MenuSettings()
|
|||||||
w.Remove(&optionBrowser2);
|
w.Remove(&optionBrowser2);
|
||||||
w.Remove(&backBtn);
|
w.Remove(&backBtn);
|
||||||
char entered[43] = "";
|
char entered[43] = "";
|
||||||
strncpy(entered, CFG.theme_path, sizeof(entered));
|
titleTxt.SetText(tr("Theme Path"));
|
||||||
|
strncpy(entered, CFG.theme_path, sizeof(entered));
|
||||||
int result = BrowseDevice(entered);
|
int result = BrowseDevice(entered);
|
||||||
//int result = OnScreenKeyboard(entered, 43,0);
|
//int result = OnScreenKeyboard(entered, 43,0);
|
||||||
HaltGui();
|
HaltGui();
|
||||||
@ -1378,7 +1383,8 @@ int MenuSettings()
|
|||||||
}
|
}
|
||||||
w.Append(&settingsbackground);
|
w.Append(&settingsbackground);
|
||||||
w.Append(&titleTxt);
|
w.Append(&titleTxt);
|
||||||
w.Append(&backBtn);
|
titleTxt.SetText(tr("Custom Paths"));
|
||||||
|
w.Append(&backBtn);
|
||||||
w.Append(&optionBrowser2);
|
w.Append(&optionBrowser2);
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
} else {
|
} else {
|
||||||
@ -1391,11 +1397,13 @@ int MenuSettings()
|
|||||||
w.Remove(&optionBrowser2);
|
w.Remove(&optionBrowser2);
|
||||||
w.Remove(&backBtn);
|
w.Remove(&backBtn);
|
||||||
char entered[43] = "";
|
char entered[43] = "";
|
||||||
strncpy(entered, Settings.titlestxt_path, sizeof(entered));
|
titleTxt.SetText(tr("XML Path"));
|
||||||
|
strncpy(entered, Settings.titlestxt_path, sizeof(entered));
|
||||||
int result = BrowseDevice(entered);
|
int result = BrowseDevice(entered);
|
||||||
//int result = OnScreenKeyboard(entered,43,0);
|
//int result = OnScreenKeyboard(entered,43,0);
|
||||||
w.Append(&optionBrowser2);
|
w.Append(&optionBrowser2);
|
||||||
w.Append(&backBtn);
|
titleTxt.SetText(tr("Custom Paths"));
|
||||||
|
w.Append(&backBtn);
|
||||||
if ( result == 1 )
|
if ( result == 1 )
|
||||||
{
|
{
|
||||||
int len = (strlen(entered)-1);
|
int len = (strlen(entered)-1);
|
||||||
@ -1424,9 +1432,11 @@ int MenuSettings()
|
|||||||
w.Remove(&backBtn);
|
w.Remove(&backBtn);
|
||||||
char entered[43] = "";
|
char entered[43] = "";
|
||||||
strncpy(entered, Settings.update_path, sizeof(entered));
|
strncpy(entered, Settings.update_path, sizeof(entered));
|
||||||
int result = BrowseDevice(entered);
|
titleTxt.SetText(tr("Update Path"));
|
||||||
|
int result = BrowseDevice(entered);
|
||||||
//int result = OnScreenKeyboard(entered,43,0);
|
//int result = OnScreenKeyboard(entered,43,0);
|
||||||
w.Append(&optionBrowser2);
|
titleTxt.SetText(tr("Custom Paths"));
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
w.Append(&backBtn);
|
w.Append(&backBtn);
|
||||||
if ( result == 1 )
|
if ( result == 1 )
|
||||||
{
|
{
|
||||||
@ -1447,9 +1457,11 @@ int MenuSettings()
|
|||||||
w.Remove(&backBtn);
|
w.Remove(&backBtn);
|
||||||
char entered[43] = "";
|
char entered[43] = "";
|
||||||
strncpy(entered, Settings.Cheatcodespath, sizeof(entered));
|
strncpy(entered, Settings.Cheatcodespath, sizeof(entered));
|
||||||
int result = BrowseDevice(entered);
|
titleTxt.SetText(tr("GCT Cheat Path"));
|
||||||
|
int result = BrowseDevice(entered);
|
||||||
//int result = OnScreenKeyboard(entered,43,0);
|
//int result = OnScreenKeyboard(entered,43,0);
|
||||||
w.Append(&optionBrowser2);
|
titleTxt.SetText(tr("Custom Paths"));
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
w.Append(&backBtn);
|
w.Append(&backBtn);
|
||||||
if ( result == 1 )
|
if ( result == 1 )
|
||||||
{
|
{
|
||||||
@ -1470,9 +1482,11 @@ int MenuSettings()
|
|||||||
w.Remove(&backBtn);
|
w.Remove(&backBtn);
|
||||||
char entered[43] = "";
|
char entered[43] = "";
|
||||||
strncpy(entered, Settings.TxtCheatcodespath, sizeof(entered));
|
strncpy(entered, Settings.TxtCheatcodespath, sizeof(entered));
|
||||||
int result = BrowseDevice(entered);
|
titleTxt.SetText(tr("TXT Cheat Path"));
|
||||||
|
int result = BrowseDevice(entered);
|
||||||
//int result = OnScreenKeyboard(entered,43,0);
|
//int result = OnScreenKeyboard(entered,43,0);
|
||||||
w.Append(&optionBrowser2);
|
titleTxt.SetText(tr("Custom Paths"));
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
w.Append(&backBtn);
|
w.Append(&backBtn);
|
||||||
if ( result == 1 )
|
if ( result == 1 )
|
||||||
{
|
{
|
||||||
@ -1493,9 +1507,11 @@ int MenuSettings()
|
|||||||
w.Remove(&backBtn);
|
w.Remove(&backBtn);
|
||||||
char entered[43] = "";
|
char entered[43] = "";
|
||||||
strncpy(entered, Settings.dolpath, sizeof(entered));
|
strncpy(entered, Settings.dolpath, sizeof(entered));
|
||||||
int result = BrowseDevice(entered);
|
titleTxt.SetText(tr("Alt Dol Path"));
|
||||||
|
int result = BrowseDevice(entered);
|
||||||
//int result = OnScreenKeyboard(entered,43,0);
|
//int result = OnScreenKeyboard(entered,43,0);
|
||||||
w.Append(&optionBrowser2);
|
titleTxt.SetText(tr("Custom Paths"));
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
w.Append(&backBtn);
|
w.Append(&backBtn);
|
||||||
if ( result == 1 )
|
if ( result == 1 )
|
||||||
{
|
{
|
||||||
@ -1520,9 +1536,11 @@ int MenuSettings()
|
|||||||
w.Remove(&backBtn);
|
w.Remove(&backBtn);
|
||||||
char entered[43] = "";
|
char entered[43] = "";
|
||||||
strncpy(entered, Settings.homebrewapps_path, sizeof(entered));
|
strncpy(entered, Settings.homebrewapps_path, sizeof(entered));
|
||||||
int result = BrowseDevice(entered);
|
titleTxt.SetText(tr("Homebrew Path"));
|
||||||
|
int result = BrowseDevice(entered);
|
||||||
//int result = OnScreenKeyboard(entered,43,0);
|
//int result = OnScreenKeyboard(entered,43,0);
|
||||||
w.Append(&optionBrowser2);
|
titleTxt.SetText(tr("Custom Paths"));
|
||||||
|
w.Append(&optionBrowser2);
|
||||||
w.Append(&backBtn);
|
w.Append(&backBtn);
|
||||||
if ( result == 1 )
|
if ( result == 1 )
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define SVN_REV "657M"
|
#define SVN_REV "657:658M"
|
||||||
|
|
||||||
const char *GetRev()
|
const char *GetRev()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user