*Compatibility issue fix for some Seagate HDDs

*Added left/right on game info screen to go to the next/previous game
*Fixed loading of titles cache settings
*Changed to show always the first game as first visible cover on carousel
This commit is contained in:
dimok321 2011-02-12 18:26:18 +00:00
parent d52b7e0ac3
commit 1392093741
8 changed files with 115 additions and 159 deletions

View File

@ -2,8 +2,8 @@
<app version="1">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>2.0 r1070</version>
<release_date>201102111742</release_date>
<version>2.0 r1071</version>
<release_date>201102120952</release_date>
<no_ios_reload/>
<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.

View File

@ -52,7 +52,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, const char *themePath, int select
width = w;
height = h;
pagesize = (gameList.size() < 11) ? gameList.size() : 11;
listOffset = (selectedGame >= 0 && selectedGame < gameList.size()) ? selectedGame : 0;
listOffset = (gameList.size() < 11) ? 0 : gameList.size()-2;
selectable = true;
selectedItem = -1;
focus = 1; // allow focus

View File

@ -980,11 +980,8 @@ int GameBrowseMenu::MainLoop()
if (SelectedGame >= 0 && SelectedGame < (s32) gameList.size())
{
rockout(SelectedGame);
struct discHdr *header = gameList[SelectedGame];
char IDfull[7];
snprintf(IDfull, sizeof(IDfull), "%s", (char *) header->id);
SetState(STATE_DISABLED);
int choice = showGameInfo(IDfull);
int choice = showGameInfo(SelectedGame);
SetState(STATE_DEFAULT);
rockout(SelectedGame, 2);
if (choice == 2)

View File

@ -575,11 +575,8 @@ int GameWindow::MainLoop()
}
else if(detailsBtn->GetState() == STATE_CLICKED)
{
char gameID[7];
struct discHdr * header = (mountMethod ? dvdheader : gameList[gameSelected]);
snprintf(gameID, sizeof(gameID), (char *) header->id);
diskImg->SetState(STATE_DISABLED);
showGameInfo(gameID);
showGameInfo(gameSelected);
mainWindow->SetState(STATE_DISABLED);
this->SetState(STATE_DEFAULT);
diskImg->SetState(STATE_DEFAULT);

View File

@ -25,10 +25,13 @@
#include "utils/ShowError.h"
#include "BoxCover/BoxCover.hpp"
extern int mountMethod;
extern struct discHdr *dvdheader;
/****************************************************************************
* gameinfo
***************************************************************************/
int showGameInfo(char *ID)
static int InternalShowGameInfo(char *ID)
{
HaltGui();//put this first to try to get rid of the code dump caused by loading this window at the same time as loading images from the SD card
mainWindow->SetState(STATE_DISABLED);
@ -57,8 +60,6 @@ int showGameInfo(char *ID)
XML_DB.CloseFile();
bool showmeminfo = false;
int choice = -1;
int titley = 10;
int marginY = titley + 40;
@ -136,9 +137,8 @@ int showGameInfo(char *ID)
gameinfoWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
gameinfoWindow.SetPosition(0, -50);
GuiWindow gameinfoWindow2(600, 308);
gameinfoWindow2.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
gameinfoWindow2.SetPosition(0, -50);
GuiWindow InfoWindow(600, 308);
InfoWindow.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
GuiWindow txtWindow(350, 270);
txtWindow.SetAlignment(ALIGN_CENTRE, ALIGN_RIGHT);
@ -172,6 +172,20 @@ int showGameInfo(char *ID)
GuiTrigger trigA_Simple;
trigA_Simple.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
GuiTrigger trigLeft;
trigLeft.SetButtonOnlyTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT);
GuiTrigger trigRight;
trigRight.SetButtonOnlyTrigger(-1, WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT, PAD_BUTTON_RIGHT);
GuiButton LeftBtn(0, 0);
LeftBtn.SetTrigger(&trigLeft);
if(mountMethod == 0) gameinfoWindow.Append(&LeftBtn);
GuiButton RightBtn(0, 0);
RightBtn.SetTrigger(&trigRight);
if(mountMethod == 0) gameinfoWindow.Append(&RightBtn);
GuiButton coverBtn(180, 250);
coverBtn.SetPosition(20, 20);
coverBtn.SetTrigger(&trigA_Simple);
@ -381,7 +395,7 @@ int showGameInfo(char *ID)
playersImg->SetWidescreen(Settings.widescreen);
playersImg->SetPosition(intputX, inputY);
playersImg->SetAlignment(0, 4);
gameinfoWindow.Append(playersImg);
InfoWindow.Append(playersImg);
intputX += (Settings.widescreen ? playersImg->GetWidth() * .8 : playersImg->GetWidth()) + 5;
}
@ -392,7 +406,7 @@ int showGameInfo(char *ID)
motionplusImg->SetWidescreen(Settings.widescreen);
motionplusImg->SetPosition(intputX, inputY);
motionplusImg->SetAlignment(0, 4);
gameinfoWindow.Append(motionplusImg);
InfoWindow.Append(motionplusImg);
intputX += (Settings.widescreen ? motionplusImg->GetWidth() * .8 : motionplusImg->GetWidth()) + 5;
}
if (nunchuk == 1)
@ -401,7 +415,7 @@ int showGameInfo(char *ID)
nunchukImg->SetWidescreen(Settings.widescreen);
nunchukImg->SetPosition(intputX, inputY);
nunchukImg->SetAlignment(0, 4);
gameinfoWindow.Append(nunchukImg);
InfoWindow.Append(nunchukImg);
intputX += (Settings.widescreen ? nunchukImg->GetWidth() * .8 : nunchukImg->GetWidth()) + 5;
}
if (classiccontroller == 1)
@ -410,7 +424,7 @@ int showGameInfo(char *ID)
classiccontrollerImg->SetWidescreen(Settings.widescreen);
classiccontrollerImg->SetPosition(intputX, inputY);
classiccontrollerImg->SetAlignment(0, 4);
gameinfoWindow.Append(classiccontrollerImg);
InfoWindow.Append(classiccontrollerImg);
intputX += (Settings.widescreen ? classiccontrollerImg->GetWidth() * .8 : classiccontrollerImg->GetWidth()) + 5;
}
if (gamecube == 1)
@ -419,7 +433,7 @@ int showGameInfo(char *ID)
gcImg->SetWidescreen(Settings.widescreen);
gcImg->SetPosition(intputX, inputY);
gcImg->SetAlignment(0, 4);
gameinfoWindow.Append(gcImg);
InfoWindow.Append(gcImg);
intputX += (Settings.widescreen ? gcImg->GetWidth() * .8 : gcImg->GetWidth()) + 5;
}
if (wheel == 1)
@ -428,7 +442,7 @@ int showGameInfo(char *ID)
wheelImg->SetWidescreen(Settings.widescreen);
wheelImg->SetPosition(intputX, inputY);
wheelImg->SetAlignment(0, 4);
gameinfoWindow.Append(wheelImg);
InfoWindow.Append(wheelImg);
intputX += (Settings.widescreen ? wheelImg->GetWidth() * .8 : wheelImg->GetWidth()) + 5;
}
if (guitar == 1)
@ -437,7 +451,7 @@ int showGameInfo(char *ID)
guitarImg->SetWidescreen(Settings.widescreen);
guitarImg->SetPosition(intputX, inputY);
guitarImg->SetAlignment(0, 4);
gameinfoWindow.Append(guitarImg);
InfoWindow.Append(guitarImg);
intputX += (Settings.widescreen ? guitarImg->GetWidth() * .8 : guitarImg->GetWidth()) + 5;
}
if (drums == 1)
@ -446,7 +460,7 @@ int showGameInfo(char *ID)
drumsImg->SetWidescreen(Settings.widescreen);
drumsImg->SetPosition(intputX, inputY);
drumsImg->SetAlignment(0, 4);
gameinfoWindow.Append(drumsImg);
InfoWindow.Append(drumsImg);
intputX += (Settings.widescreen ? drumsImg->GetWidth() * .8 : drumsImg->GetWidth()) + 5;
}
if (microphone == 1)
@ -455,7 +469,7 @@ int showGameInfo(char *ID)
microphoneImg->SetWidescreen(Settings.widescreen);
microphoneImg->SetPosition(intputX, inputY);
microphoneImg->SetAlignment(0, 4);
gameinfoWindow.Append(microphoneImg);
InfoWindow.Append(microphoneImg);
intputX += (Settings.widescreen ? microphoneImg->GetWidth() * .8 : microphoneImg->GetWidth()) + 5;
}
if (zapper == 1)
@ -464,7 +478,7 @@ int showGameInfo(char *ID)
zapperImg->SetWidescreen(Settings.widescreen);
zapperImg->SetPosition(intputX, inputY);
zapperImg->SetAlignment(0, 4);
gameinfoWindow.Append(zapperImg);
InfoWindow.Append(zapperImg);
intputX += (Settings.widescreen ? zapperImg->GetWidth() * .8 : zapperImg->GetWidth()) + 5;
}
if (wiispeak == 1)
@ -473,7 +487,7 @@ int showGameInfo(char *ID)
wiispeakImg->SetWidescreen(Settings.widescreen);
wiispeakImg->SetPosition(intputX, inputY);
wiispeakImg->SetAlignment(0, 4);
gameinfoWindow.Append(wiispeakImg);
InfoWindow.Append(wiispeakImg);
intputX += (Settings.widescreen ? wiispeakImg->GetWidth() * .8 : wiispeakImg->GetWidth()) + 5;
}
if (nintendods == 1)
@ -482,7 +496,7 @@ int showGameInfo(char *ID)
nintendodsImg->SetWidescreen(Settings.widescreen);
nintendodsImg->SetPosition(intputX, inputY);
nintendodsImg->SetAlignment(0, 4);
gameinfoWindow.Append(nintendodsImg);
InfoWindow.Append(nintendodsImg);
intputX += (Settings.widescreen ? nintendodsImg->GetWidth() * .8 : nintendodsImg->GetWidth()) + 5;
}
if (dancepad == 1)
@ -491,7 +505,7 @@ int showGameInfo(char *ID)
dancepadImg->SetWidescreen(Settings.widescreen);
dancepadImg->SetPosition(intputX, inputY);
dancepadImg->SetAlignment(0, 4);
gameinfoWindow.Append(dancepadImg);
InfoWindow.Append(dancepadImg);
intputX += (Settings.widescreen ? dancepadImg->GetWidth() * .8 : dancepadImg->GetWidth()) + 5;
}
if (balanceboard == 1)
@ -500,7 +514,7 @@ int showGameInfo(char *ID)
balanceboardImg->SetWidescreen(Settings.widescreen);
balanceboardImg->SetPosition(intputX, inputY);
balanceboardImg->SetAlignment(0, 4);
gameinfoWindow.Append(balanceboardImg);
InfoWindow.Append(balanceboardImg);
intputX += (Settings.widescreen ? balanceboardImg->GetWidth() * .8 : balanceboardImg->GetWidth()) + 5;
}
@ -532,7 +546,7 @@ int showGameInfo(char *ID)
wifiplayersImg->SetWidescreen(Settings.widescreen);
wifiplayersImg->SetPosition(intputX, inputY);
wifiplayersImg->SetAlignment(0, 4);
gameinfoWindow.Append(wifiplayersImg);
InfoWindow.Append(wifiplayersImg);
intputX += (Settings.widescreen ? wifiplayersImg->GetWidth() * .8 : wifiplayersImg->GetWidth()) + 5;
}
@ -599,21 +613,10 @@ int showGameInfo(char *ID)
ratingImg->SetWidescreen(Settings.widescreen);
ratingImg->SetPosition(-25, inputY);
ratingImg->SetAlignment(1, 4);
gameinfoWindow.Append(ratingImg);
InfoWindow.Append(ratingImg);
intputX += (Settings.widescreen ? ratingImg->GetWidth() * .8 : ratingImg->GetWidth()) + 5;
}
// memory info
if (showmeminfo)
{
char meminfotxt[200];
strlcpy(meminfotxt, MemInfo(), sizeof(meminfotxt));
memTxt = new GuiText(meminfotxt, 18, ( GXColor ) {0, 0, 0, 255});
memTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
memTxt->SetPosition(0, 0);
gameinfoWindow.Append(memTxt);
}
// title
int titlefontsize = 25;
if (GameInfo.Title.size() > 0)
@ -622,7 +625,7 @@ int showGameInfo(char *ID)
titleTxt->SetMaxWidth(350, SCROLL_HORIZONTAL);
titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
titleTxt->SetPosition(txtXOffset, 12 + titley);
gameinfoWindow.Append(titleTxt);
InfoWindow.Append(titleTxt);
}
//date
@ -682,7 +685,7 @@ int showGameInfo(char *ID)
releasedTxt->SetPosition(-17, 12 + indexy);
indexy += (20 * newline);
newline = 1;
gameinfoWindow.Append(releasedTxt);
InfoWindow.Append(releasedTxt);
}
//publisher
@ -696,7 +699,7 @@ int showGameInfo(char *ID)
publisherTxt->SetPosition(-17, 12 + indexy);
indexy += (20 * newline);
newline = 1;
gameinfoWindow.Append(publisherTxt);
InfoWindow.Append(publisherTxt);
}
//developer
@ -710,7 +713,7 @@ int showGameInfo(char *ID)
developerTxt->SetPosition(-17, 12 + indexy);
indexy += (20 * newline);
newline = 1;
gameinfoWindow.Append(developerTxt);
InfoWindow.Append(developerTxt);
}
//genre
@ -721,7 +724,7 @@ int showGameInfo(char *ID)
genreTitleTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
genreTitleTxt->SetPosition(205, 12 + genreY);
genreY += 20;
gameinfoWindow.Append(genreTitleTxt);
InfoWindow.Append(genreTitleTxt);
}
genreTxt = new GuiText *[GameInfo.GenreList.size()+1]; //to not alloc a 0 vector
@ -731,7 +734,7 @@ int showGameInfo(char *ID)
genreTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
genreTxt[i]->SetPosition(215, 12 + genreY);
genreY += 20;
gameinfoWindow.Append(genreTxt[i]);
InfoWindow.Append(genreTxt[i]);
}
//online
@ -750,7 +753,7 @@ int showGameInfo(char *ID)
wifiTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
wifiTxt[i]->SetPosition(215, 200 + wifiY);
wifiY -= 20;
gameinfoWindow.Append(wifiTxt[i]);
InfoWindow.Append(wifiTxt[i]);
}
if (GameInfo.WifiFeatureList.size() > 0)
{
@ -763,7 +766,7 @@ int showGameInfo(char *ID)
wifiTxt[0] = new GuiText(linebuf2, 16, ( GXColor ) {0, 0, 0, 255});
wifiTxt[0]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
wifiTxt[0]->SetPosition(205, 200 + wifiY);
gameinfoWindow.Append(wifiTxt[0]);
InfoWindow.Append(wifiTxt[0]);
//synopsis
int pagesize = 12;
@ -776,31 +779,9 @@ int showGameInfo(char *ID)
synopsisTxt->SetLinesToDraw(pagesize);
synopsisTxt->Refresh();
dialogBoxImg11 = new GuiImage(&dialogBox1);
dialogBoxImg11->SetAlignment(0, 3);
dialogBoxImg11->SetPosition(-9, 0);
dialogBoxImg22 = new GuiImage(&dialogBox2);
dialogBoxImg22->SetAlignment(0, 3);
dialogBoxImg22->SetPosition(145, 0);
dialogBoxImg33 = new GuiImage(&dialogBox3);
dialogBoxImg33->SetAlignment(0, 3);
dialogBoxImg33->SetPosition(301, 0);
dialogBoxImg44 = new GuiImage(&dialogBox4);
dialogBoxImg44->SetAlignment(0, 3);
dialogBoxImg44->SetPosition(457, 0);
gameinfoWindow2.Append(dialogBoxImg11);
gameinfoWindow2.Append(dialogBoxImg22);
gameinfoWindow2.Append(dialogBoxImg33);
gameinfoWindow2.Append(dialogBoxImg44);
txtWindow.Append(synopsisTxt);
txtWindow.Append(&upBtn);
txtWindow.Append(&dnBtn);
gameinfoWindow2.Append(&txtWindow);
}
wiitdb1Txt = new GuiText("http://wiitdb.com", 16, ( GXColor ) {0, 0, 0, 255});
@ -809,6 +790,9 @@ int showGameInfo(char *ID)
gameinfoWindow.Append(wiitdb1Txt);
if(coverImg) gameinfoWindow.Append(coverImg);
// Set info window first
gameinfoWindow.Append(&InfoWindow);
HaltGui();
//mainWindow->SetState(STATE_DISABLED);
mainWindow->Append(&gameinfoWindow);
@ -828,32 +812,31 @@ int showGameInfo(char *ID)
else if (reset == 1)
Sys_Reboot();
else if(LeftBtn.GetState() == STATE_CLICKED)
{
choice = 3;
break;
}
else if(RightBtn.GetState() == STATE_CLICKED)
{
choice = 4;
break;
}
else if ((backBtn.GetState() == STATE_CLICKED) || (backBtn.GetState() == STATE_HELD))
{
backBtn.ResetState();
if (page == 1)
{
choice = 1;
if (synopsisTxt) delete synopsisTxt;
synopsisTxt = NULL;
break;
}
else if (page == 2)
{
HaltGui();
gameinfoWindow2.Remove(&nextBtn);
gameinfoWindow2.Remove(&backBtn);
gameinfoWindow2.Remove(&homeBtn);
gameinfoWindow2.Remove(&coverBtn);
gameinfoWindow2.Remove(coverImg);
gameinfoWindow2.SetVisible(false);
gameinfoWindow.SetVisible(true);
gameinfoWindow.Append(&backBtn);
gameinfoWindow.Append(&nextBtn);
gameinfoWindow.Append(&homeBtn);
gameinfoWindow.Append(&coverBtn);
gameinfoWindow.Append(coverImg);
mainWindow->Remove(&gameinfoWindow2);
gameinfoWindow.Remove(&txtWindow);
gameinfoWindow.Append(&InfoWindow);
ResumeGui();
page = 1;
}
@ -861,10 +844,10 @@ int showGameInfo(char *ID)
else if(coverBtn.GetState() == STATE_CLICKED && boxCov)
{
boxCov->SetEffect(EFFECT_BOX_FLY_CENTRE, 100);
gameinfoWindow2.Remove(&nextBtn);
gameinfoWindow2.Remove(&homeBtn);
gameinfoWindow.Remove(&nextBtn);
gameinfoWindow.Remove(&homeBtn);
gameinfoWindow.Remove(&LeftBtn);
gameinfoWindow.Remove(&RightBtn);
boxCov->SetZoomable(true);
while(backBtn.GetState() != STATE_CLICKED && homeBtn.GetState() != STATE_CLICKED)
@ -876,16 +859,10 @@ int showGameInfo(char *ID)
Sys_Reboot();
}
if (page == 1)
{
gameinfoWindow.Append(&nextBtn);
gameinfoWindow.Append(&homeBtn);
}
else
{
gameinfoWindow2.Append(&nextBtn);
gameinfoWindow2.Append(&homeBtn);
}
gameinfoWindow.Append(&LeftBtn);
gameinfoWindow.Append(&RightBtn);
boxCov->SetZoomable(false);
boxCov->SetEffect(EFFECT_BOX_FLY_BACK, 100);
@ -900,42 +877,16 @@ int showGameInfo(char *ID)
if (page == 1)
{
HaltGui();
gameinfoWindow.Remove(&nextBtn);
gameinfoWindow.Remove(&backBtn);
gameinfoWindow.Remove(&homeBtn);
gameinfoWindow.Remove(&coverBtn);
gameinfoWindow.Remove(wiitdb1Txt);
gameinfoWindow.Remove(coverImg);
gameinfoWindow.SetVisible(false);
gameinfoWindow2.SetVisible(true);
gameinfoWindow2.Append(&nextBtn);
gameinfoWindow2.Append(&backBtn);
gameinfoWindow2.Append(&homeBtn);
gameinfoWindow2.Append(&coverBtn);
gameinfoWindow2.Append(wiitdb1Txt);
gameinfoWindow2.Append(coverImg);
mainWindow->Append(&gameinfoWindow2);
gameinfoWindow.Remove(&InfoWindow);
gameinfoWindow.Append(&txtWindow);
ResumeGui();
page = 2;
}
else
{
HaltGui();
gameinfoWindow2.Remove(&nextBtn);
gameinfoWindow2.Remove(&backBtn);
gameinfoWindow2.Remove(&homeBtn);
gameinfoWindow2.Remove(&coverBtn);
gameinfoWindow2.Remove(wiitdb1Txt);
gameinfoWindow2.Remove(coverImg);
gameinfoWindow2.SetVisible(false);
gameinfoWindow.SetVisible(true);
gameinfoWindow.Append(&backBtn);
gameinfoWindow.Append(&nextBtn);
gameinfoWindow.Append(&homeBtn);
gameinfoWindow.Append(&coverBtn);
gameinfoWindow.Append(wiitdb1Txt);
gameinfoWindow.Append(coverImg);
mainWindow->Remove(&gameinfoWindow2);
gameinfoWindow.Remove(&txtWindow);
gameinfoWindow.Append(&InfoWindow);
ResumeGui();
page = 1;
}
@ -957,24 +908,10 @@ int showGameInfo(char *ID)
if (!((ButtonsHold() & WPAD_BUTTON_DOWN) || (ButtonsHold() & PAD_BUTTON_DOWN))) dnBtn.ResetState();
}
else if (homeBtn.GetState() == STATE_CLICKED)
{
if (page == 1)
{
choice = 2;
if (synopsisTxt) delete synopsisTxt;
synopsisTxt = NULL;
break;
}
else if (page == 2)
{
HaltGui();
gameinfoWindow2.SetVisible(false);
gameinfoWindow.SetVisible(true);
mainWindow->Remove(&gameinfoWindow2);
ResumeGui();
page = 1;
}
}
}
HaltGui();
@ -1055,6 +992,33 @@ int showGameInfo(char *ID)
return choice;
}
int showGameInfo(int gameSelected)
{
char gameID[7];
int choice = 5;
while(choice > 2)
{
struct discHdr * header = (mountMethod ? dvdheader : gameList[gameSelected]);
snprintf(gameID, sizeof(gameID), (char *) header->id);
choice = InternalShowGameInfo(gameID);
if(choice == 3)
{
--gameSelected;
if(gameSelected < 0)
gameSelected = 0;
}
else if(choice == 4)
{
gameSelected = (gameSelected + 1) % gameList.size();
}
}
return choice;
}
bool save_gamelist(int txt) // save gamelist
{
mainWindow->SetState(STATE_DISABLED);
@ -1132,10 +1096,3 @@ bool save_gamelist(int txt) // save gamelist
mainWindow->SetState(STATE_DEFAULT);
return true;
}
void MemInfoPrompt()
{
char meminfotxt[200];
strlcpy(meminfotxt, MemInfo(), sizeof(meminfotxt));
WindowPrompt(0, meminfotxt, tr( "OK" ));
}

View File

@ -8,7 +8,7 @@
#ifndef _GAMEINFO_H_
#define _GAMEINFO_H_
int showGameInfo(char *ID);
int showGameInfo(int selectedGame);
bool save_gamelist(int txt);
void MemInfoPrompt();
#endif

View File

@ -258,6 +258,7 @@ bool CSettings::Save()
fprintf(file, "HomeMenu = %d\n ", HomeMenu);
fprintf(file, "MultiplePartitions = %d\n ", MultiplePartitions);
fprintf(file, "USBPort = %d\n ", USBPort);
fprintf(file, "CacheTitles = %d\n ", CacheTitles);
fclose(file);
return true;
@ -470,6 +471,11 @@ bool CSettings::SetSetting(char *name, char *value)
if (sscanf(value, "%d", &i) == 1) USBPort = i;
return true;
}
else if (strcmp(name, "CacheTitles") == 0)
{
if (sscanf(value, "%d", &i) == 1) CacheTitles = i;
return true;
}
else if (strcmp(name, "patchcountrystrings") == 0)
{
if (sscanf(value, "%d", &i) == 1) patchcountrystrings = i;

View File

@ -60,7 +60,7 @@
#define isMEM2Buffer(p) (((u32) p & 0x10000000) != 0)
#define MAX_BUFFER_SECTORS 256
#define UMS_HEAPSIZE 0x1000
#define UMS_HEAPSIZE 0x8000
/* Variables */
static char fs[] ATTRIBUTE_ALIGN(32) = "/dev/usb2";
@ -96,7 +96,6 @@ s32 USBStorage2_Init(void)
/* Initialize USB storage */
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_INIT, ":");
if (ret < 0) goto err;
/* Get device capacity */
if (USBStorage2_GetCapacity(&hdd_sector_size) == 0)
@ -105,7 +104,7 @@ s32 USBStorage2_Init(void)
goto err;
}
return ret; // 0->HDD, 1->DVD
return 0; // 0->HDD, 1->DVD
err:
/* Close USB device */