fix code dumps when loading without a SD card

add screenshot shit to gameinfo window
This commit is contained in:
giantpune 2009-12-20 10:11:00 +00:00
parent cb628348d6
commit 5d19915af8
5 changed files with 39 additions and 17 deletions

View File

@ -2,8 +2,8 @@
<app version="1">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>1.0 r871</version>
<release_date>200912192124</release_date>
<version>1.0 r872</version>
<release_date>200912200514</release_date>
<short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.

View File

@ -105,7 +105,7 @@ int MenuCheck() {
}
}
if (ret2 >= 0 || load_from_fs != PART_FS_WBFS) {
if ((ret2 >= 0 || load_from_fs != PART_FS_WBFS) && isInserted(bootDevice)) {
cfg_save_global();
break;
}
@ -138,7 +138,7 @@ int MenuCheck() {
}
// open database if needed, load titles if needed
OpenXMLDatabase(Settings.titlestxt_path,Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true);
if(isInserted(bootDevice))OpenXMLDatabase(Settings.titlestxt_path,Settings.db_language, Settings.db_JPtoEN, true, Settings.titlesOverride==1?true:false, true);
// titles.txt loaded after database to override database titles with custom titles
//snprintf(pathname, sizeof(pathname), "%stitles.txt", Settings.titlestxt_path);

View File

@ -1227,6 +1227,7 @@ int MenuDiscList() {
case 'W':
sprintf(gameregion,"NTSC T");
break;
default:
case 'K':
sprintf(gameregion,"NTSC K");
break;

View File

@ -113,7 +113,7 @@ int MenuFormat() {
menu = MENU_DISCLIST;
Settings.partition = ret;
cfg_save_global();
if(isInserted(bootDevice))cfg_save_global();
} else {
sprintf(text, "%s %d : %.2fGB",tr("Partition"), ret+1, entry->size * (partitions.sector_size / GB_SIZE));
choice = WindowPrompt( tr("Do you want to format:"), text,tr("Yes"),tr("No"));

View File

@ -18,6 +18,7 @@
#include "prompts/PromptWindows.h"
#include "gameinfo.h"
#include "usbloader/getentries.h"
#include "../gecko.h"
/*** Extern variables ***/
@ -779,6 +780,14 @@ int showGameInfo(char *ID) {
gameinfoWindow.Append(wiitdb3Txt);
gameinfoWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 100);
GuiTrigger trigZ;
trigZ.SetButtonOnlyTrigger(-1, WPAD_NUNCHUK_BUTTON_Z | WPAD_CLASSIC_BUTTON_ZL, PAD_TRIGGER_Z);
GuiButton screenShotBtn(0,0);
screenShotBtn.SetPosition(0,0);
screenShotBtn.SetTrigger(&trigZ);
gameinfoWindow.Append(&screenShotBtn);
HaltGui();
//mainWindow->SetState(STATE_DISABLED);
mainWindow->Append(&gameinfoWindow);
@ -807,11 +816,13 @@ int showGameInfo(char *ID) {
gameinfoWindow2.Remove(&nextBtn);
gameinfoWindow2.Remove(&backBtn);
gameinfoWindow2.Remove(&homeBtn);
gameinfoWindow2.Remove(&screenShotBtn);
gameinfoWindow2.SetVisible(false);
gameinfoWindow.SetVisible(true);
gameinfoWindow.Append(&backBtn);
gameinfoWindow.Append(&nextBtn);
gameinfoWindow.Append(&homeBtn);
gameinfoWindow.Append(&screenShotBtn);
mainWindow->Remove(&gameinfoWindow2);
ResumeGui();
page=1;
@ -824,12 +835,14 @@ int showGameInfo(char *ID) {
gameinfoWindow.Remove(&nextBtn);
gameinfoWindow.Remove(&backBtn);
gameinfoWindow.Remove(&homeBtn);
gameinfoWindow.Remove(&screenShotBtn);
gameinfoWindow.SetVisible(false);
gameinfoWindow2.SetVisible(true);
coverImg->SetPosition(15,30);
gameinfoWindow2.Append(&nextBtn);
gameinfoWindow2.Append(&backBtn);
gameinfoWindow2.Append(&homeBtn);
gameinfoWindow2.Append(&screenShotBtn);
mainWindow->Append(&gameinfoWindow2);
ResumeGui();
page=2;
@ -838,11 +851,13 @@ int showGameInfo(char *ID) {
gameinfoWindow2.Remove(&nextBtn);
gameinfoWindow2.Remove(&backBtn);
gameinfoWindow2.Remove(&homeBtn);
gameinfoWindow2.Remove(&screenShotBtn);
gameinfoWindow2.SetVisible(false);
gameinfoWindow.SetVisible(true);
gameinfoWindow.Append(&backBtn);
gameinfoWindow.Append(&nextBtn);
gameinfoWindow.Append(&homeBtn);
gameinfoWindow.Append(&screenShotBtn);
mainWindow->Remove(&gameinfoWindow2);
ResumeGui();
page=1;
@ -901,6 +916,12 @@ int showGameInfo(char *ID) {
}
urlBtn.ResetState();
}
else if (screenShotBtn.GetState() == STATE_CLICKED) {
gprintf("\n\tscreenShotBtn clicked");
screenShotBtn.ResetState();
ScreenShot();
gprintf("...It's easy, mmmmmmKay");
}
}
if (page==1) {
gameinfoWindow.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 100);