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
@ -75,6 +76,8 @@ main(int argc, char *argv[])
SDCard_Init(); // mount SD for loading cfg's
USBDevice_Init(); // and mount USB:/
gettextCleanUp();
CFG_Load();

View File

@ -288,6 +288,8 @@ int autoSelectDol(const char *id)
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,6 +302,15 @@ 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 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);
@ -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,8 +1280,10 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
strncpy(entered, Settings.covers_path, sizeof(entered));
titleTxt.SetText(tr("Cover Path"));
int result = BrowseDevice(entered);
//int result = OnScreenKeyboard(entered,43,0);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
@ -1307,8 +1309,10 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
strncpy(entered, Settings.disc_path, sizeof(entered));
titleTxt.SetText(tr("Disc Path"));
int result = BrowseDevice(entered);
//int result = OnScreenKeyboard(entered, 43,0);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
@ -1333,6 +1337,7 @@ int MenuSettings()
w.Remove(&optionBrowser2);
w.Remove(&backBtn);
char entered[43] = "";
titleTxt.SetText(tr("Theme Path"));
strncpy(entered, CFG.theme_path, sizeof(entered));
int result = BrowseDevice(entered);
//int result = OnScreenKeyboard(entered, 43,0);
@ -1378,6 +1383,7 @@ int MenuSettings()
}
w.Append(&settingsbackground);
w.Append(&titleTxt);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&backBtn);
w.Append(&optionBrowser2);
ResumeGui();
@ -1391,10 +1397,12 @@ int MenuSettings()
w.Remove(&optionBrowser2);
w.Remove(&backBtn);
char entered[43] = "";
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);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&backBtn);
if ( result == 1 )
{
@ -1424,8 +1432,10 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
strncpy(entered, Settings.update_path, sizeof(entered));
titleTxt.SetText(tr("Update Path"));
int result = BrowseDevice(entered);
//int result = OnScreenKeyboard(entered,43,0);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
@ -1447,8 +1457,10 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
strncpy(entered, Settings.Cheatcodespath, sizeof(entered));
titleTxt.SetText(tr("GCT Cheat Path"));
int result = BrowseDevice(entered);
//int result = OnScreenKeyboard(entered,43,0);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
@ -1470,8 +1482,10 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
strncpy(entered, Settings.TxtCheatcodespath, sizeof(entered));
titleTxt.SetText(tr("TXT Cheat Path"));
int result = BrowseDevice(entered);
//int result = OnScreenKeyboard(entered,43,0);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
@ -1493,8 +1507,10 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
strncpy(entered, Settings.dolpath, sizeof(entered));
titleTxt.SetText(tr("Alt Dol Path"));
int result = BrowseDevice(entered);
//int result = OnScreenKeyboard(entered,43,0);
titleTxt.SetText(tr("Custom Paths"));
w.Append(&optionBrowser2);
w.Append(&backBtn);
if ( result == 1 )
@ -1520,8 +1536,10 @@ int MenuSettings()
w.Remove(&backBtn);
char entered[43] = "";
strncpy(entered, Settings.homebrewapps_path, sizeof(entered));
titleTxt.SetText(tr("Homebrew Path"));
int result = BrowseDevice(entered);
//int result = OnScreenKeyboard(entered,43,0);
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()
{