This commit is contained in:
giantpune 2009-07-28 03:16:25 +00:00
parent 772a60131d
commit d32d1aa6f6
5 changed files with 104 additions and 33 deletions

View File

@ -58,6 +58,7 @@ main(int argc, char *argv[])
else if(!strncasecmp(argv[0], "sd:/", 4))
bootDevice_found = true;
}
if(!bootDevice_found)
{
//try USB
@ -71,10 +72,12 @@ main(int argc, char *argv[])
ret2 = IOS_ReloadIOS(222);
load_ehc_module();
}
SDCard_Init(); // mount SD for loading cfg's
USBDevice_Init(); // and mount USB:/
gettextCleanUp();
CFG_Load();

View File

@ -287,6 +287,8 @@ int autoSelectDol(const char *id)
if (strcmp(id,"RBOE69") == 0) return 675;//starstremr
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)
601 rm2x69
RZTE01 = WSR = 674
Fifa08 RF8P69 463

View File

@ -20,6 +20,7 @@
#include "filebrowser.h"
#include "menu.h"
#include "listfiles.h"
#include "language/gettext.h"
#include "PromptWindows.h"
#include "libwiigui/gui.h"
@ -301,7 +302,16 @@ main:
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);
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});
GuiImage ExitBtnImg(&btnOutline);
if (Settings.wsprompt == yes){
@ -316,6 +326,19 @@ main:
ExitBtn.SetTrigger(&trigB);
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});
GuiImage okBtnImg(&btnOutline);
if (Settings.wsprompt == yes){
@ -353,7 +376,8 @@ main:
w.Append(&fileBrowser);
w.Append(&Adressbar);
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);
ResumeGui();
@ -405,20 +429,42 @@ main:
}
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;
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();

View File

@ -1280,9 +1280,11 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
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);
w.Append(&optionBrowser2);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
{
@ -1307,9 +1309,11 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
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);
w.Append(&optionBrowser2);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
{
@ -1333,7 +1337,8 @@ int MenuSettings()
w.Remove(&optionBrowser2);
w.Remove(&backBtn);
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 = OnScreenKeyboard(entered, 43,0);
HaltGui();
@ -1378,7 +1383,8 @@ int MenuSettings()
}
w.Append(&settingsbackground);
w.Append(&titleTxt);
w.Append(&backBtn);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&backBtn);
w.Append(&optionBrowser2);
ResumeGui();
} else {
@ -1391,11 +1397,13 @@ int MenuSettings()
w.Remove(&optionBrowser2);
w.Remove(&backBtn);
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 = OnScreenKeyboard(entered,43,0);
w.Append(&optionBrowser2);
w.Append(&backBtn);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&backBtn);
if ( result == 1 )
{
int len = (strlen(entered)-1);
@ -1424,9 +1432,11 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
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);
w.Append(&optionBrowser2);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
{
@ -1447,9 +1457,11 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
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);
w.Append(&optionBrowser2);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
{
@ -1470,9 +1482,11 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
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);
w.Append(&optionBrowser2);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
{
@ -1493,9 +1507,11 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
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);
w.Append(&optionBrowser2);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
{
@ -1520,9 +1536,11 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
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);
w.Append(&optionBrowser2);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
{

View File

@ -1,4 +1,4 @@
#define SVN_REV "657M"
#define SVN_REV "657:658M"
const char *GetRev()
{