- support for SD-Gecko in Slot A or B
- updated device-prompt: choice 5: SD-Gecko Slot A, choice 6: SD-Gecko Slot B
- updaetd storage option 'all' to include SD-Geckos
- fixed a regression from rev37 when storage is dvd don't loop three times
- fixed a regression from rev39 correctly treat <no_ios_reload>
- added <force_no_ios_reload/> support, for testing purposes
btw: not hot-plugging support for SD-Geckos\!
This commit is contained in:
Christopher Roy Bratusek 2012-08-25 23:15:52 +02:00
parent dcb8c516fd
commit 906598cad9
14 changed files with 217 additions and 20 deletions

Binary file not shown.

View File

@ -106,6 +106,16 @@ int MenuMain()
temp_sd_usb_active = Theme.dvd_active;
temp_sd_usb_inactive = Theme.dvd_inactive;
}
else if(Settings.device == "gca")
{
temp_sd_usb_active = Theme.gca_active;
temp_sd_usb_inactive = Theme.gca_inactive;
}
else if(Settings.device == "gcb")
{
temp_sd_usb_active = Theme.gcb_active;
temp_sd_usb_inactive = Theme.gcb_inactive;
}
else if(Settings.device == "all")
{
temp_sd_usb_active = Theme.all_active;
@ -404,6 +414,16 @@ int MenuMain()
viewdevice = new GuiImage (new GuiImageData(Theme.dvd_inactive));
icon = true;
}
else if(strncmp(vechomebrew_list_choice[i].foldername.c_str(), "gca", 3) == 0)
{
viewdevice = new GuiImage (new GuiImageData(Theme.gca_inactive));
icon = true;
}
else if(strncmp(vechomebrew_list_choice[i].foldername.c_str(), "gcb", 3) == 0)
{
viewdevice = new GuiImage (new GuiImageData(Theme.gcb_inactive));
icon = true;
}
if(icon)
{
@ -692,7 +712,9 @@ int MenuMain()
// SD, USB
else if(sd_usb_Btn.GetState() == STATE_CLICKED || Settings.sd_insert == -1 || Settings.sd_insert == 2
|| Settings.usb_insert == -1 || Settings.usb_insert == 2
|| Settings.dvd_insert == -1 || Settings.dvd_insert == 2)
|| Settings.dvd_insert == -1 || Settings.dvd_insert == 2
|| Settings.gca_insert == -1 || Settings.gca_insert == 2
|| Settings.gcb_insert == -1 || Settings.gcb_insert == 2)
{
int device = -1;
if(sd_usb_Btn.GetState() == STATE_CLICKED)
@ -707,11 +729,17 @@ int MenuMain()
else if(device == 4)
Settings.device = "dvd";
else if(device == 5)
Settings.device = "gca";
else if(device == 6)
Settings.device = "gcb";
else if(device == 7)
Settings.device = "all";
if(device != -1 || Settings.sd_insert == -1 || Settings.sd_insert == 2
|| Settings.usb_insert == -1 || Settings.usb_insert == 2
|| Settings.dvd_insert == -1 || Settings.dvd_insert == 2)
|| Settings.dvd_insert == -1 || Settings.dvd_insert == 2
|| Settings.gca_insert == -1 || Settings.gca_insert == 2
|| Settings.gcb_insert == -1 || Settings.gcb_insert == 2)
{
check_device();
Settings.current_page = 1;

View File

@ -22,7 +22,7 @@ int devicePrompt()
bool stop = false;
int device = -1;
GuiWindow promptWindow(232,64);
GuiWindow promptWindow(328,64);
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
promptWindow.SetPosition(-135, 280);
GuiTrigger trigA;
@ -43,6 +43,10 @@ int devicePrompt()
GuiImageData sd_usb_BtnImgDataOver(Theme.sd_usb_active);
GuiImageData dvd_BtnImgData(Theme.dvd_inactive);
GuiImageData dvd_BtnImgDataOver(Theme.dvd_active);
GuiImageData gca_BtnImgData(Theme.gca_inactive);
GuiImageData gca_BtnImgDataOver(Theme.gca_active);
GuiImageData gcb_BtnImgData(Theme.gcb_inactive);
GuiImageData gcb_BtnImgDataOver(Theme.gcb_active);
GuiImageData all_BtnImgData(Theme.all_inactive);
GuiImageData all_BtnImgDataOver(Theme.all_active);
@ -51,6 +55,8 @@ int devicePrompt()
GuiImage usb_BtnImg(&usb_BtnImgData);
GuiImage sd_usb_BtnImg(&sd_usb_BtnImgData);
GuiImage dvd_BtnImg(&dvd_BtnImgData);
GuiImage gca_BtnImg(&gca_BtnImgData);
GuiImage gcb_BtnImg(&gca_BtnImgData);
GuiImage all_BtnImg(&all_BtnImgData);
// button over
@ -58,6 +64,8 @@ int devicePrompt()
GuiImage usb_BtnImgOver(&usb_BtnImgDataOver);
GuiImage sd_usb_BtnImgOver(&sd_usb_BtnImgDataOver);
GuiImage dvd_BtnImgOver(&dvd_BtnImgDataOver);
GuiImage gca_BtnImgOver(&gca_BtnImgDataOver);
GuiImage gcb_BtnImgOver(&gca_BtnImgDataOver);
GuiImage all_BtnImgOver(&all_BtnImgDataOver);
GuiButton sd_Btn(sd_BtnImgData.GetWidth(), sd_BtnImgData.GetHeight());
@ -75,19 +83,33 @@ int devicePrompt()
usb_Btn.SetTrigger(&trigA);
GuiButton sd_usb_Btn(sd_usb_BtnImgData.GetWidth(), sd_usb_BtnImgData.GetHeight());
sd_usb_Btn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
sd_usb_Btn.SetPosition(0, 0);
sd_usb_Btn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
sd_usb_Btn.SetPosition(96, 0);
sd_usb_Btn.SetImage(&sd_usb_BtnImg);
sd_usb_Btn.SetImageOver(&sd_usb_BtnImgOver);
sd_usb_Btn.SetTrigger(&trigA);
GuiButton dvd_Btn(dvd_BtnImgData.GetWidth(), dvd_BtnImgData.GetHeight());
dvd_Btn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
dvd_Btn.SetPosition(-52, 0);
dvd_Btn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
dvd_Btn.SetPosition(0, 0);
dvd_Btn.SetImage(&dvd_BtnImg);
dvd_Btn.SetImageOver(&dvd_BtnImgOver);
dvd_Btn.SetTrigger(&trigA);
GuiButton gca_Btn(gca_BtnImgData.GetWidth(), gca_BtnImgData.GetHeight());
gca_Btn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
gca_Btn.SetPosition(-96, 0);
gca_Btn.SetImage(&gca_BtnImg);
gca_Btn.SetImageOver(&gca_BtnImgOver);
gca_Btn.SetTrigger(&trigA);
GuiButton gcb_Btn(gcb_BtnImgData.GetWidth(), gcb_BtnImgData.GetHeight());
gcb_Btn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
gcb_Btn.SetPosition(-52, 0);
gcb_Btn.SetImage(&gcb_BtnImg);
gcb_Btn.SetImageOver(&gcb_BtnImgOver);
gcb_Btn.SetTrigger(&trigA);
GuiButton all_Btn(all_BtnImgData.GetWidth(), all_BtnImgData.GetHeight());
all_Btn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
all_Btn.SetPosition(-8, 0);
@ -103,6 +125,8 @@ int devicePrompt()
promptWindow.Append(&usb_Btn);
promptWindow.Append(&sd_usb_Btn);
promptWindow.Append(&dvd_Btn);
promptWindow.Append(&gca_Btn);
promptWindow.Append(&gcb_Btn);
promptWindow.Append(&all_Btn);
promptWindow.Append(&back);
@ -140,12 +164,24 @@ int devicePrompt()
stop = true;
}
if(all_Btn.GetState() == STATE_CLICKED)
if(gca_Btn.GetState() == STATE_CLICKED)
{
device = 5;
stop = true;
}
if(gcb_Btn.GetState() == STATE_CLICKED)
{
device = 6;
stop = true;
}
if(all_Btn.GetState() == STATE_CLICKED)
{
device = 7;
stop = true;
}
if(back.GetState() == STATE_CLICKED)
stop = true;
}

View File

@ -49,7 +49,7 @@ void add(string device, string apps_path)
{
sprintf(pathmeta, (device + ":/" + apps_path + "%s/meta.xml").c_str() ,pent->d_name);
string line, quelltext, name, info, foldername, iconpath, arg, force_reload, temp_reload, temp_reload2, temp_reload3;
string line, quelltext, name, info, foldername, iconpath, arg, force_reload, temp_reload, temp_reload2, temp_reload3, temp_reload4;
ifstream in(pathmeta);
while(getline(in, line))
quelltext = quelltext + line + "\n";
@ -77,6 +77,8 @@ void add(string device, string apps_path)
temp_reload = parser(quelltext, "<force_ios_reload", ">");
temp_reload2 = parser(quelltext, "<ahb_access", ">");
temp_reload3 = parser(quelltext, "<no_ios_reload", ">");
temp_reload4 = parser(quelltext, "<force_no_iois_reload", ">");
if (temp_reload[0] != 0)
{
force_reload = "RELOAD";
@ -86,6 +88,10 @@ void add(string device, string apps_path)
force_reload = "HW_AHBPROT";
}
else if (temp_reload3[0] != 0)
{
force_reload = "RELOAD";
}
else if (temp_reload4[0] != 0)
{
force_reload = "NORELOAD";
}
@ -119,7 +125,8 @@ void app_list()
{
vechomebrew_list_category[0].clear();
if(Settings.device == "sd1" || Settings.device == "usb1" || Settings.device == "dvd")
if(Settings.device == "sd1" || Settings.device == "usb1" || Settings.device == "dvd"
|| Settings.device == "gca" || Settings.device == "gcb")
{
if(Settings.system == 1)
add(Settings.device, "apps/");
@ -158,12 +165,16 @@ void app_list()
add("sd1", "apps/");
add("usb1", "apps/");
add("dvd", "apps/");
add("gca", "apps/");
add("gcb", "apps/");
}
else if(Settings.system == 0)
{
add("sd1", "gc_apps/");
add("usb1", "gc_apps/");
add("dvd", "gc_apps/");
add("gca", "gc_apps/");
add("gcb", "gc_apps/");
}
else if(Settings.system == 2)
{
@ -173,6 +184,10 @@ void app_list()
add("usb1", "gc_apps/");
add("dvd", "apps/");
add("dvd", "gc_apps/");
add("gca", "apps/");
add("gca", "gc_apps/");
add("gcb", "apps/");
add("gcb", "gc_apps/");
}
}

View File

@ -18,12 +18,13 @@ void copy_app_in_unassigned()
int anzahl_device = 0, anzahl_ordner = 0;
// Geräte SD, USB
if(Settings.device == "sd1" || Settings.device == "usb1")
if(Settings.device == "sd1" || Settings.device == "usb1" || Settings.device == "dvd"
|| Settings.device == "gca" || Settings.device == "gcb")
anzahl_device = 1;
else if(Settings.device == "sd_usb")
anzahl_device = 2;
else if(Settings.device == "all")
anzahl_device = 3;
anzahl_device = 5;
// Ordner APPS, GC_APPS
if(Settings.system == 1 || Settings.system == 0)
@ -57,13 +58,11 @@ void copy_app_in_unassigned()
foldername = "usb1" + ordner + apps[a] + "/";
else if(x == 2)
foldername = "dvd" + ordner + apps[a] + "/";
else if(x == 3)
foldername = "gca" + ordner + apps[a] + "/";
else if(x == 4)
foldername = "gcb" + ordner + apps[a] + "/";
}
if(
strcasecmp(vechomebrew_list_category[0][i].foldername.c_str(), foldername.c_str()) == 0 ||
strcasecmp(vechomebrew_list_category[0][i].foldername.c_str(), "the homebrew channel") == 0
)
present = false;
}
}
}

View File

@ -15,6 +15,7 @@
#include <fat.h>
#include <ext2.h>
#include <sdcard/wiisd_io.h>
#include <sdcard/gcsd.h>
#include <ogc/usbstorage.h>
#include <dirent.h>
#include <di/di.h>
@ -526,7 +527,6 @@ static void UnmountPartitions(int device)
static bool MountPartitions(int device)
{
const DISC_INTERFACE* disc = NULL;
switch(device)
@ -564,6 +564,16 @@ void MountAllDevices()
if(dvd->startup() && dvd->isInserted())
MountDVD();
usleep(250000);
if(__io_gcsda.startup() && __io_gcsda.isInserted())
fatMountSimple("gca", &__io_gcsda);
usleep(250000);
if(__io_gcsdb.startup() && __io_gcsdb.isInserted())
fatMountSimple("gcb", &__io_gcsdb);
}
bool MountDVDFS()
@ -628,6 +638,59 @@ void UnmountAllDevices()
UnmountPartitions(DEVICE_USB);
}
bool GCA_Inserted()
{
return __io_gcsda.isInserted();
}
void check_gca()
{
if(Settings.gca_insert <= 0)
{
if(__io_gcsda.startup() && __io_gcsda.isInserted()) // wenn sd karte gefunden, neu einlesen
{
fatMountSimple("gca", &__io_gcsda);
Settings.gca_insert = 2;
}
}
else if(Settings.gca_insert == 1)
{
if(!__io_gcsda.isInserted()) // wenn sd karte nicht gefunden, beenden
{
fatUnmount("gca:");
Settings.gca_insert = -1;
}
}
}
bool GCB_Inserted()
{
return __io_gcsdb.isInserted();
}
void check_gcb()
{
if(Settings.gcb_insert <= 0)
{
if(__io_gcsdb.startup() && __io_gcsdb.isInserted()) // wenn sd karte gefunden, neu einlesen
{
fatMountSimple("gcb", &__io_gcsdb);
Settings.gcb_insert = 2;
}
}
else if(Settings.gcb_insert == 1)
{
if(!__io_gcsdb.isInserted()) // wenn sd karte nicht gefunden, beenden
{
fatUnmount("gcb:");
Settings.gcb_insert = -1;
}
}
}
bool SDCard_Inserted()
{
return sd->isInserted();
@ -726,6 +789,16 @@ void check_device()
else if(Settings.dvd_insert == -1)
Settings.dvd_insert = 0;
if(Settings.gca_insert == 2)
Settings.gca_insert = 1;
else if(Settings.gca_insert == -1)
Settings.gca_insert = 0;
if(Settings.gcb_insert == 2)
Settings.gcb_insert = 1;
else if(Settings.gcb_insert == -1)
Settings.gcb_insert = 0;
HaltThrobberThread();
}

View File

@ -40,6 +40,11 @@ void UnMountDVD();
bool DVD_Inserted();
void check_dvd();
bool GCA_Inserted();
bool GCB_Inserted();
void check_gca();
void check_gcb();
/*
//!USB FAT Controls
int USBDevice_Init();

View File

@ -46,6 +46,10 @@ DefaultTheme()
Theme.sd_usb_inactive = sd_usb_inactive_png;
Theme.dvd_active = dvd_active_png;
Theme.dvd_inactive = dvd_inactive_png;
Theme.gca_active = gca_active_png;
Theme.gca_inactive = gca_inactive_png;
Theme.gcb_active = gcb_active_png;
Theme.gcb_inactive = gcb_inactive_png;
Theme.all_active = all_active_png;
Theme.all_inactive = all_inactive_png;
Theme.wii_active = wii_active_png;
@ -197,6 +201,10 @@ void theme(string path)
Theme.sd_usb_inactive = load_data(Theme.sd_usb_inactive , path + "sd_usb_inactive.png");
Theme.dvd_active = load_data(Theme.dvd_active , path + "dvd_active.png");
Theme.dvd_inactive = load_data(Theme.dvd_inactive , path + "dvd_inactive.png");
Theme.gca_active = load_data(Theme.gca_active , path + "gca_active.png");
Theme.gca_inactive = load_data(Theme.gca_inactive , path + "gca_inactive.png");
Theme.gcb_active = load_data(Theme.gcb_active , path + "gcb_active.png");
Theme.gcb_inactive = load_data(Theme.gcb_inactive , path + "gcb_inactive.png");
Theme.all_active = load_data(Theme.all_active , path + "all_active.png");
Theme.all_inactive = load_data(Theme.all_inactive , path + "all_inactive.png");
Theme.loader_active = load_data(Theme.loader_active , path + "loader_active.png");

View File

@ -41,6 +41,10 @@ struct STheme
const u8* sd_usb_inactive;
const u8* dvd_active;
const u8* dvd_inactive;
const u8* gca_active;
const u8* gca_inactive;
const u8* gcb_active;
const u8* gcb_inactive;
const u8* all_active;
const u8* all_inactive;
const u8* loader_active;

View File

@ -194,12 +194,24 @@ extern const u32 sd_usb_inactive_png_size;
extern const u8 dvd_active_png[];
extern const u32 dvd_active_png_size;
extern const u8 gca_active_png[];
extern const u32 gca_active_png_size;
extern const u8 gcb_active_png[];
extern const u32 gcb_active_png_size;
extern const u8 all_active_png[];
extern const u32 all_active_png_size;
extern const u8 dvd_inactive_png[];
extern const u32 dvd_inactive_png_size;
extern const u8 gca_inactive_png[];
extern const u32 gca_inactive_png_size;
extern const u8 gcb_inactive_png[];
extern const u32 gcb_inactive_png_size;
extern const u8 all_inactive_png[];
extern const u32 all_inactive_png_size;

View File

@ -131,6 +131,8 @@ DefaultSettings()
Settings.sd_insert = SDCard_Inserted();
Settings.usb_insert = USBDevice_Inserted();
Settings.dvd_insert = DVD_Inserted();
Settings.gca_insert = GCA_Inserted();
Settings.gcb_insert = GCB_Inserted();
Settings.category_name_all = "All";
sprintf (Settings.new_category_name, "New Category");
Settings.current_category = 0;

View File

@ -71,6 +71,8 @@ struct SSettings
int sd_insert;
int usb_insert;
int dvd_insert;
int gca_insert;
int gcb_insert;
string category_name_all;
string category_name;
char new_category_name[256];

View File

@ -1,4 +1,4 @@
#define SVN_REV 39
#define SVN_REV 40
int SvnRev()
{

13
updates
View File

@ -1,6 +1,19 @@
//rev40:
- new icon (JoostinOnline)
- catalan language downloadble (Adrián Laviós)
- added support SD-Gecko (both A and B, no hot-plugging)
- fixed a regression from rev39. <no_ios_reload> is now
treated correctly (makes WiiMC properly detect HDD)
- fixed a regression from rev37. don't loop three times
when selected storage device is DVD
- added <force_no_ios_reload/> support, for testing purposes
- fixed clean rule in main/Makefile
- For theme designers: the following new icons have been added:
* gca_active (device menu)
* gca_inactive (device menu)
* gcb_active (device menu)
* gcb_inactive (device menu)
* choice_large (not new, but wider now)
//rev39:
- BUGFIX: before saving the update boot.dol, ensure directory