diff --git a/installer/wad/0001000154484246.tmd b/installer/wad/0001000154484246.tmd index e8ed466..fab50c6 100644 Binary files a/installer/wad/0001000154484246.tmd and b/installer/wad/0001000154484246.tmd differ diff --git a/main/source/Menus/menu_main.cpp b/main/source/Menus/menu_main.cpp index 7bb7721..0617f66 100644 --- a/main/source/Menus/menu_main.cpp +++ b/main/source/Menus/menu_main.cpp @@ -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; diff --git a/main/source/Prompts/prompt_device.cpp b/main/source/Prompts/prompt_device.cpp index 57f0518..cbf5531 100644 --- a/main/source/Prompts/prompt_device.cpp +++ b/main/source/Prompts/prompt_device.cpp @@ -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; } diff --git a/main/source/Tools/app_list.cpp b/main/source/Tools/app_list.cpp index 0809b42..84329b2 100644 --- a/main/source/Tools/app_list.cpp +++ b/main/source/Tools/app_list.cpp @@ -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, ""); temp_reload2 = parser(quelltext, ""); temp_reload3 = parser(quelltext, ""); + temp_reload4 = parser(quelltext, ""); + 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/"); } } diff --git a/main/source/Tools/copy_app_in_category.cpp b/main/source/Tools/copy_app_in_category.cpp index 3e25116..4961cf2 100644 --- a/main/source/Tools/copy_app_in_category.cpp +++ b/main/source/Tools/copy_app_in_category.cpp @@ -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; } } } diff --git a/main/source/Tools/fileop.cpp b/main/source/Tools/fileop.cpp index a46e7d0..00e436d 100644 --- a/main/source/Tools/fileop.cpp +++ b/main/source/Tools/fileop.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -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(); } diff --git a/main/source/Tools/fileop.h b/main/source/Tools/fileop.h index ffc8615..224b070 100644 --- a/main/source/Tools/fileop.h +++ b/main/source/Tools/fileop.h @@ -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(); diff --git a/main/source/Tools/theme.cpp b/main/source/Tools/theme.cpp index 4e60e55..f2cf7ca 100644 --- a/main/source/Tools/theme.cpp +++ b/main/source/Tools/theme.cpp @@ -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"); diff --git a/main/source/Tools/theme.h b/main/source/Tools/theme.h index 594bce6..a9f44fb 100644 --- a/main/source/Tools/theme.h +++ b/main/source/Tools/theme.h @@ -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; diff --git a/main/source/filelist.h b/main/source/filelist.h index b359548..4cc6e6a 100644 --- a/main/source/filelist.h +++ b/main/source/filelist.h @@ -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; diff --git a/main/source/main.cpp b/main/source/main.cpp index ca23321..2c7d263 100644 --- a/main/source/main.cpp +++ b/main/source/main.cpp @@ -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; diff --git a/main/source/main.h b/main/source/main.h index 707b751..e2b4000 100644 --- a/main/source/main.h +++ b/main/source/main.h @@ -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]; diff --git a/svnrev/svnrev.c b/svnrev/svnrev.c index 1644736..643aa88 100644 --- a/svnrev/svnrev.c +++ b/svnrev/svnrev.c @@ -1,4 +1,4 @@ -#define SVN_REV 39 +#define SVN_REV 40 int SvnRev() { diff --git a/updates b/updates index e020c13..cccf512 100644 --- a/updates +++ b/updates @@ -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. 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 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