mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-16 16:29:18 +01:00
*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:
parent
d52b7e0ac3
commit
1392093741
@ -2,8 +2,8 @@
|
|||||||
<app version="1">
|
<app version="1">
|
||||||
<name> USB Loader GX</name>
|
<name> USB Loader GX</name>
|
||||||
<coder>USB Loader GX Team</coder>
|
<coder>USB Loader GX Team</coder>
|
||||||
<version>2.0 r1070</version>
|
<version>2.0 r1071</version>
|
||||||
<release_date>201102111742</release_date>
|
<release_date>201102120952</release_date>
|
||||||
<no_ios_reload/>
|
<no_ios_reload/>
|
||||||
<short_description>Loads games from USB-devices</short_description>
|
<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.
|
<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.
|
||||||
|
@ -52,7 +52,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, const char *themePath, int select
|
|||||||
width = w;
|
width = w;
|
||||||
height = h;
|
height = h;
|
||||||
pagesize = (gameList.size() < 11) ? gameList.size() : 11;
|
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;
|
selectable = true;
|
||||||
selectedItem = -1;
|
selectedItem = -1;
|
||||||
focus = 1; // allow focus
|
focus = 1; // allow focus
|
||||||
|
@ -980,11 +980,8 @@ int GameBrowseMenu::MainLoop()
|
|||||||
if (SelectedGame >= 0 && SelectedGame < (s32) gameList.size())
|
if (SelectedGame >= 0 && SelectedGame < (s32) gameList.size())
|
||||||
{
|
{
|
||||||
rockout(SelectedGame);
|
rockout(SelectedGame);
|
||||||
struct discHdr *header = gameList[SelectedGame];
|
|
||||||
char IDfull[7];
|
|
||||||
snprintf(IDfull, sizeof(IDfull), "%s", (char *) header->id);
|
|
||||||
SetState(STATE_DISABLED);
|
SetState(STATE_DISABLED);
|
||||||
int choice = showGameInfo(IDfull);
|
int choice = showGameInfo(SelectedGame);
|
||||||
SetState(STATE_DEFAULT);
|
SetState(STATE_DEFAULT);
|
||||||
rockout(SelectedGame, 2);
|
rockout(SelectedGame, 2);
|
||||||
if (choice == 2)
|
if (choice == 2)
|
||||||
|
@ -575,11 +575,8 @@ int GameWindow::MainLoop()
|
|||||||
}
|
}
|
||||||
else if(detailsBtn->GetState() == STATE_CLICKED)
|
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);
|
diskImg->SetState(STATE_DISABLED);
|
||||||
showGameInfo(gameID);
|
showGameInfo(gameSelected);
|
||||||
mainWindow->SetState(STATE_DISABLED);
|
mainWindow->SetState(STATE_DISABLED);
|
||||||
this->SetState(STATE_DEFAULT);
|
this->SetState(STATE_DEFAULT);
|
||||||
diskImg->SetState(STATE_DEFAULT);
|
diskImg->SetState(STATE_DEFAULT);
|
||||||
|
@ -25,10 +25,13 @@
|
|||||||
#include "utils/ShowError.h"
|
#include "utils/ShowError.h"
|
||||||
#include "BoxCover/BoxCover.hpp"
|
#include "BoxCover/BoxCover.hpp"
|
||||||
|
|
||||||
|
extern int mountMethod;
|
||||||
|
extern struct discHdr *dvdheader;
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* gameinfo
|
* 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
|
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);
|
mainWindow->SetState(STATE_DISABLED);
|
||||||
@ -57,8 +60,6 @@ int showGameInfo(char *ID)
|
|||||||
|
|
||||||
XML_DB.CloseFile();
|
XML_DB.CloseFile();
|
||||||
|
|
||||||
bool showmeminfo = false;
|
|
||||||
|
|
||||||
int choice = -1;
|
int choice = -1;
|
||||||
int titley = 10;
|
int titley = 10;
|
||||||
int marginY = titley + 40;
|
int marginY = titley + 40;
|
||||||
@ -136,9 +137,8 @@ int showGameInfo(char *ID)
|
|||||||
gameinfoWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
gameinfoWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||||
gameinfoWindow.SetPosition(0, -50);
|
gameinfoWindow.SetPosition(0, -50);
|
||||||
|
|
||||||
GuiWindow gameinfoWindow2(600, 308);
|
GuiWindow InfoWindow(600, 308);
|
||||||
gameinfoWindow2.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
InfoWindow.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||||
gameinfoWindow2.SetPosition(0, -50);
|
|
||||||
|
|
||||||
GuiWindow txtWindow(350, 270);
|
GuiWindow txtWindow(350, 270);
|
||||||
txtWindow.SetAlignment(ALIGN_CENTRE, ALIGN_RIGHT);
|
txtWindow.SetAlignment(ALIGN_CENTRE, ALIGN_RIGHT);
|
||||||
@ -172,6 +172,20 @@ int showGameInfo(char *ID)
|
|||||||
GuiTrigger trigA_Simple;
|
GuiTrigger trigA_Simple;
|
||||||
trigA_Simple.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
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);
|
GuiButton coverBtn(180, 250);
|
||||||
coverBtn.SetPosition(20, 20);
|
coverBtn.SetPosition(20, 20);
|
||||||
coverBtn.SetTrigger(&trigA_Simple);
|
coverBtn.SetTrigger(&trigA_Simple);
|
||||||
@ -381,7 +395,7 @@ int showGameInfo(char *ID)
|
|||||||
playersImg->SetWidescreen(Settings.widescreen);
|
playersImg->SetWidescreen(Settings.widescreen);
|
||||||
playersImg->SetPosition(intputX, inputY);
|
playersImg->SetPosition(intputX, inputY);
|
||||||
playersImg->SetAlignment(0, 4);
|
playersImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(playersImg);
|
InfoWindow.Append(playersImg);
|
||||||
intputX += (Settings.widescreen ? playersImg->GetWidth() * .8 : playersImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? playersImg->GetWidth() * .8 : playersImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -392,7 +406,7 @@ int showGameInfo(char *ID)
|
|||||||
motionplusImg->SetWidescreen(Settings.widescreen);
|
motionplusImg->SetWidescreen(Settings.widescreen);
|
||||||
motionplusImg->SetPosition(intputX, inputY);
|
motionplusImg->SetPosition(intputX, inputY);
|
||||||
motionplusImg->SetAlignment(0, 4);
|
motionplusImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(motionplusImg);
|
InfoWindow.Append(motionplusImg);
|
||||||
intputX += (Settings.widescreen ? motionplusImg->GetWidth() * .8 : motionplusImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? motionplusImg->GetWidth() * .8 : motionplusImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (nunchuk == 1)
|
if (nunchuk == 1)
|
||||||
@ -401,7 +415,7 @@ int showGameInfo(char *ID)
|
|||||||
nunchukImg->SetWidescreen(Settings.widescreen);
|
nunchukImg->SetWidescreen(Settings.widescreen);
|
||||||
nunchukImg->SetPosition(intputX, inputY);
|
nunchukImg->SetPosition(intputX, inputY);
|
||||||
nunchukImg->SetAlignment(0, 4);
|
nunchukImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(nunchukImg);
|
InfoWindow.Append(nunchukImg);
|
||||||
intputX += (Settings.widescreen ? nunchukImg->GetWidth() * .8 : nunchukImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? nunchukImg->GetWidth() * .8 : nunchukImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (classiccontroller == 1)
|
if (classiccontroller == 1)
|
||||||
@ -410,7 +424,7 @@ int showGameInfo(char *ID)
|
|||||||
classiccontrollerImg->SetWidescreen(Settings.widescreen);
|
classiccontrollerImg->SetWidescreen(Settings.widescreen);
|
||||||
classiccontrollerImg->SetPosition(intputX, inputY);
|
classiccontrollerImg->SetPosition(intputX, inputY);
|
||||||
classiccontrollerImg->SetAlignment(0, 4);
|
classiccontrollerImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(classiccontrollerImg);
|
InfoWindow.Append(classiccontrollerImg);
|
||||||
intputX += (Settings.widescreen ? classiccontrollerImg->GetWidth() * .8 : classiccontrollerImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? classiccontrollerImg->GetWidth() * .8 : classiccontrollerImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (gamecube == 1)
|
if (gamecube == 1)
|
||||||
@ -419,7 +433,7 @@ int showGameInfo(char *ID)
|
|||||||
gcImg->SetWidescreen(Settings.widescreen);
|
gcImg->SetWidescreen(Settings.widescreen);
|
||||||
gcImg->SetPosition(intputX, inputY);
|
gcImg->SetPosition(intputX, inputY);
|
||||||
gcImg->SetAlignment(0, 4);
|
gcImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(gcImg);
|
InfoWindow.Append(gcImg);
|
||||||
intputX += (Settings.widescreen ? gcImg->GetWidth() * .8 : gcImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? gcImg->GetWidth() * .8 : gcImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (wheel == 1)
|
if (wheel == 1)
|
||||||
@ -428,7 +442,7 @@ int showGameInfo(char *ID)
|
|||||||
wheelImg->SetWidescreen(Settings.widescreen);
|
wheelImg->SetWidescreen(Settings.widescreen);
|
||||||
wheelImg->SetPosition(intputX, inputY);
|
wheelImg->SetPosition(intputX, inputY);
|
||||||
wheelImg->SetAlignment(0, 4);
|
wheelImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(wheelImg);
|
InfoWindow.Append(wheelImg);
|
||||||
intputX += (Settings.widescreen ? wheelImg->GetWidth() * .8 : wheelImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? wheelImg->GetWidth() * .8 : wheelImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (guitar == 1)
|
if (guitar == 1)
|
||||||
@ -437,7 +451,7 @@ int showGameInfo(char *ID)
|
|||||||
guitarImg->SetWidescreen(Settings.widescreen);
|
guitarImg->SetWidescreen(Settings.widescreen);
|
||||||
guitarImg->SetPosition(intputX, inputY);
|
guitarImg->SetPosition(intputX, inputY);
|
||||||
guitarImg->SetAlignment(0, 4);
|
guitarImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(guitarImg);
|
InfoWindow.Append(guitarImg);
|
||||||
intputX += (Settings.widescreen ? guitarImg->GetWidth() * .8 : guitarImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? guitarImg->GetWidth() * .8 : guitarImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (drums == 1)
|
if (drums == 1)
|
||||||
@ -446,7 +460,7 @@ int showGameInfo(char *ID)
|
|||||||
drumsImg->SetWidescreen(Settings.widescreen);
|
drumsImg->SetWidescreen(Settings.widescreen);
|
||||||
drumsImg->SetPosition(intputX, inputY);
|
drumsImg->SetPosition(intputX, inputY);
|
||||||
drumsImg->SetAlignment(0, 4);
|
drumsImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(drumsImg);
|
InfoWindow.Append(drumsImg);
|
||||||
intputX += (Settings.widescreen ? drumsImg->GetWidth() * .8 : drumsImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? drumsImg->GetWidth() * .8 : drumsImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (microphone == 1)
|
if (microphone == 1)
|
||||||
@ -455,7 +469,7 @@ int showGameInfo(char *ID)
|
|||||||
microphoneImg->SetWidescreen(Settings.widescreen);
|
microphoneImg->SetWidescreen(Settings.widescreen);
|
||||||
microphoneImg->SetPosition(intputX, inputY);
|
microphoneImg->SetPosition(intputX, inputY);
|
||||||
microphoneImg->SetAlignment(0, 4);
|
microphoneImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(microphoneImg);
|
InfoWindow.Append(microphoneImg);
|
||||||
intputX += (Settings.widescreen ? microphoneImg->GetWidth() * .8 : microphoneImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? microphoneImg->GetWidth() * .8 : microphoneImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (zapper == 1)
|
if (zapper == 1)
|
||||||
@ -464,7 +478,7 @@ int showGameInfo(char *ID)
|
|||||||
zapperImg->SetWidescreen(Settings.widescreen);
|
zapperImg->SetWidescreen(Settings.widescreen);
|
||||||
zapperImg->SetPosition(intputX, inputY);
|
zapperImg->SetPosition(intputX, inputY);
|
||||||
zapperImg->SetAlignment(0, 4);
|
zapperImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(zapperImg);
|
InfoWindow.Append(zapperImg);
|
||||||
intputX += (Settings.widescreen ? zapperImg->GetWidth() * .8 : zapperImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? zapperImg->GetWidth() * .8 : zapperImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (wiispeak == 1)
|
if (wiispeak == 1)
|
||||||
@ -473,7 +487,7 @@ int showGameInfo(char *ID)
|
|||||||
wiispeakImg->SetWidescreen(Settings.widescreen);
|
wiispeakImg->SetWidescreen(Settings.widescreen);
|
||||||
wiispeakImg->SetPosition(intputX, inputY);
|
wiispeakImg->SetPosition(intputX, inputY);
|
||||||
wiispeakImg->SetAlignment(0, 4);
|
wiispeakImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(wiispeakImg);
|
InfoWindow.Append(wiispeakImg);
|
||||||
intputX += (Settings.widescreen ? wiispeakImg->GetWidth() * .8 : wiispeakImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? wiispeakImg->GetWidth() * .8 : wiispeakImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (nintendods == 1)
|
if (nintendods == 1)
|
||||||
@ -482,7 +496,7 @@ int showGameInfo(char *ID)
|
|||||||
nintendodsImg->SetWidescreen(Settings.widescreen);
|
nintendodsImg->SetWidescreen(Settings.widescreen);
|
||||||
nintendodsImg->SetPosition(intputX, inputY);
|
nintendodsImg->SetPosition(intputX, inputY);
|
||||||
nintendodsImg->SetAlignment(0, 4);
|
nintendodsImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(nintendodsImg);
|
InfoWindow.Append(nintendodsImg);
|
||||||
intputX += (Settings.widescreen ? nintendodsImg->GetWidth() * .8 : nintendodsImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? nintendodsImg->GetWidth() * .8 : nintendodsImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (dancepad == 1)
|
if (dancepad == 1)
|
||||||
@ -491,7 +505,7 @@ int showGameInfo(char *ID)
|
|||||||
dancepadImg->SetWidescreen(Settings.widescreen);
|
dancepadImg->SetWidescreen(Settings.widescreen);
|
||||||
dancepadImg->SetPosition(intputX, inputY);
|
dancepadImg->SetPosition(intputX, inputY);
|
||||||
dancepadImg->SetAlignment(0, 4);
|
dancepadImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(dancepadImg);
|
InfoWindow.Append(dancepadImg);
|
||||||
intputX += (Settings.widescreen ? dancepadImg->GetWidth() * .8 : dancepadImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? dancepadImg->GetWidth() * .8 : dancepadImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
if (balanceboard == 1)
|
if (balanceboard == 1)
|
||||||
@ -500,7 +514,7 @@ int showGameInfo(char *ID)
|
|||||||
balanceboardImg->SetWidescreen(Settings.widescreen);
|
balanceboardImg->SetWidescreen(Settings.widescreen);
|
||||||
balanceboardImg->SetPosition(intputX, inputY);
|
balanceboardImg->SetPosition(intputX, inputY);
|
||||||
balanceboardImg->SetAlignment(0, 4);
|
balanceboardImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(balanceboardImg);
|
InfoWindow.Append(balanceboardImg);
|
||||||
intputX += (Settings.widescreen ? balanceboardImg->GetWidth() * .8 : balanceboardImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? balanceboardImg->GetWidth() * .8 : balanceboardImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -532,7 +546,7 @@ int showGameInfo(char *ID)
|
|||||||
wifiplayersImg->SetWidescreen(Settings.widescreen);
|
wifiplayersImg->SetWidescreen(Settings.widescreen);
|
||||||
wifiplayersImg->SetPosition(intputX, inputY);
|
wifiplayersImg->SetPosition(intputX, inputY);
|
||||||
wifiplayersImg->SetAlignment(0, 4);
|
wifiplayersImg->SetAlignment(0, 4);
|
||||||
gameinfoWindow.Append(wifiplayersImg);
|
InfoWindow.Append(wifiplayersImg);
|
||||||
intputX += (Settings.widescreen ? wifiplayersImg->GetWidth() * .8 : wifiplayersImg->GetWidth()) + 5;
|
intputX += (Settings.widescreen ? wifiplayersImg->GetWidth() * .8 : wifiplayersImg->GetWidth()) + 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -599,21 +613,10 @@ int showGameInfo(char *ID)
|
|||||||
ratingImg->SetWidescreen(Settings.widescreen);
|
ratingImg->SetWidescreen(Settings.widescreen);
|
||||||
ratingImg->SetPosition(-25, inputY);
|
ratingImg->SetPosition(-25, inputY);
|
||||||
ratingImg->SetAlignment(1, 4);
|
ratingImg->SetAlignment(1, 4);
|
||||||
gameinfoWindow.Append(ratingImg);
|
InfoWindow.Append(ratingImg);
|
||||||
intputX += (Settings.widescreen ? ratingImg->GetWidth() * .8 : ratingImg->GetWidth()) + 5;
|
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
|
// title
|
||||||
int titlefontsize = 25;
|
int titlefontsize = 25;
|
||||||
if (GameInfo.Title.size() > 0)
|
if (GameInfo.Title.size() > 0)
|
||||||
@ -622,7 +625,7 @@ int showGameInfo(char *ID)
|
|||||||
titleTxt->SetMaxWidth(350, SCROLL_HORIZONTAL);
|
titleTxt->SetMaxWidth(350, SCROLL_HORIZONTAL);
|
||||||
titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
titleTxt->SetPosition(txtXOffset, 12 + titley);
|
titleTxt->SetPosition(txtXOffset, 12 + titley);
|
||||||
gameinfoWindow.Append(titleTxt);
|
InfoWindow.Append(titleTxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
//date
|
//date
|
||||||
@ -682,7 +685,7 @@ int showGameInfo(char *ID)
|
|||||||
releasedTxt->SetPosition(-17, 12 + indexy);
|
releasedTxt->SetPosition(-17, 12 + indexy);
|
||||||
indexy += (20 * newline);
|
indexy += (20 * newline);
|
||||||
newline = 1;
|
newline = 1;
|
||||||
gameinfoWindow.Append(releasedTxt);
|
InfoWindow.Append(releasedTxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
//publisher
|
//publisher
|
||||||
@ -696,7 +699,7 @@ int showGameInfo(char *ID)
|
|||||||
publisherTxt->SetPosition(-17, 12 + indexy);
|
publisherTxt->SetPosition(-17, 12 + indexy);
|
||||||
indexy += (20 * newline);
|
indexy += (20 * newline);
|
||||||
newline = 1;
|
newline = 1;
|
||||||
gameinfoWindow.Append(publisherTxt);
|
InfoWindow.Append(publisherTxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
//developer
|
//developer
|
||||||
@ -710,7 +713,7 @@ int showGameInfo(char *ID)
|
|||||||
developerTxt->SetPosition(-17, 12 + indexy);
|
developerTxt->SetPosition(-17, 12 + indexy);
|
||||||
indexy += (20 * newline);
|
indexy += (20 * newline);
|
||||||
newline = 1;
|
newline = 1;
|
||||||
gameinfoWindow.Append(developerTxt);
|
InfoWindow.Append(developerTxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
//genre
|
//genre
|
||||||
@ -721,7 +724,7 @@ int showGameInfo(char *ID)
|
|||||||
genreTitleTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
genreTitleTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||||
genreTitleTxt->SetPosition(205, 12 + genreY);
|
genreTitleTxt->SetPosition(205, 12 + genreY);
|
||||||
genreY += 20;
|
genreY += 20;
|
||||||
gameinfoWindow.Append(genreTitleTxt);
|
InfoWindow.Append(genreTitleTxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
genreTxt = new GuiText *[GameInfo.GenreList.size()+1]; //to not alloc a 0 vector
|
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]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||||
genreTxt[i]->SetPosition(215, 12 + genreY);
|
genreTxt[i]->SetPosition(215, 12 + genreY);
|
||||||
genreY += 20;
|
genreY += 20;
|
||||||
gameinfoWindow.Append(genreTxt[i]);
|
InfoWindow.Append(genreTxt[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//online
|
//online
|
||||||
@ -750,7 +753,7 @@ int showGameInfo(char *ID)
|
|||||||
wifiTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
wifiTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||||
wifiTxt[i]->SetPosition(215, 200 + wifiY);
|
wifiTxt[i]->SetPosition(215, 200 + wifiY);
|
||||||
wifiY -= 20;
|
wifiY -= 20;
|
||||||
gameinfoWindow.Append(wifiTxt[i]);
|
InfoWindow.Append(wifiTxt[i]);
|
||||||
}
|
}
|
||||||
if (GameInfo.WifiFeatureList.size() > 0)
|
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] = new GuiText(linebuf2, 16, ( GXColor ) {0, 0, 0, 255});
|
||||||
wifiTxt[0]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
wifiTxt[0]->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||||
wifiTxt[0]->SetPosition(205, 200 + wifiY);
|
wifiTxt[0]->SetPosition(205, 200 + wifiY);
|
||||||
gameinfoWindow.Append(wifiTxt[0]);
|
InfoWindow.Append(wifiTxt[0]);
|
||||||
|
|
||||||
//synopsis
|
//synopsis
|
||||||
int pagesize = 12;
|
int pagesize = 12;
|
||||||
@ -776,31 +779,9 @@ int showGameInfo(char *ID)
|
|||||||
synopsisTxt->SetLinesToDraw(pagesize);
|
synopsisTxt->SetLinesToDraw(pagesize);
|
||||||
synopsisTxt->Refresh();
|
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(synopsisTxt);
|
||||||
txtWindow.Append(&upBtn);
|
txtWindow.Append(&upBtn);
|
||||||
txtWindow.Append(&dnBtn);
|
txtWindow.Append(&dnBtn);
|
||||||
gameinfoWindow2.Append(&txtWindow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wiitdb1Txt = new GuiText("http://wiitdb.com", 16, ( GXColor ) {0, 0, 0, 255});
|
wiitdb1Txt = new GuiText("http://wiitdb.com", 16, ( GXColor ) {0, 0, 0, 255});
|
||||||
@ -809,6 +790,9 @@ int showGameInfo(char *ID)
|
|||||||
gameinfoWindow.Append(wiitdb1Txt);
|
gameinfoWindow.Append(wiitdb1Txt);
|
||||||
if(coverImg) gameinfoWindow.Append(coverImg);
|
if(coverImg) gameinfoWindow.Append(coverImg);
|
||||||
|
|
||||||
|
// Set info window first
|
||||||
|
gameinfoWindow.Append(&InfoWindow);
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
//mainWindow->SetState(STATE_DISABLED);
|
//mainWindow->SetState(STATE_DISABLED);
|
||||||
mainWindow->Append(&gameinfoWindow);
|
mainWindow->Append(&gameinfoWindow);
|
||||||
@ -828,32 +812,31 @@ int showGameInfo(char *ID)
|
|||||||
else if (reset == 1)
|
else if (reset == 1)
|
||||||
Sys_Reboot();
|
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))
|
else if ((backBtn.GetState() == STATE_CLICKED) || (backBtn.GetState() == STATE_HELD))
|
||||||
{
|
{
|
||||||
backBtn.ResetState();
|
backBtn.ResetState();
|
||||||
if (page == 1)
|
if (page == 1)
|
||||||
{
|
{
|
||||||
choice = 1;
|
choice = 1;
|
||||||
if (synopsisTxt) delete synopsisTxt;
|
|
||||||
synopsisTxt = NULL;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (page == 2)
|
else if (page == 2)
|
||||||
{
|
{
|
||||||
HaltGui();
|
HaltGui();
|
||||||
gameinfoWindow2.Remove(&nextBtn);
|
gameinfoWindow.Remove(&txtWindow);
|
||||||
gameinfoWindow2.Remove(&backBtn);
|
gameinfoWindow.Append(&InfoWindow);
|
||||||
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);
|
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
page = 1;
|
page = 1;
|
||||||
}
|
}
|
||||||
@ -861,10 +844,10 @@ int showGameInfo(char *ID)
|
|||||||
else if(coverBtn.GetState() == STATE_CLICKED && boxCov)
|
else if(coverBtn.GetState() == STATE_CLICKED && boxCov)
|
||||||
{
|
{
|
||||||
boxCov->SetEffect(EFFECT_BOX_FLY_CENTRE, 100);
|
boxCov->SetEffect(EFFECT_BOX_FLY_CENTRE, 100);
|
||||||
gameinfoWindow2.Remove(&nextBtn);
|
|
||||||
gameinfoWindow2.Remove(&homeBtn);
|
|
||||||
gameinfoWindow.Remove(&nextBtn);
|
gameinfoWindow.Remove(&nextBtn);
|
||||||
gameinfoWindow.Remove(&homeBtn);
|
gameinfoWindow.Remove(&homeBtn);
|
||||||
|
gameinfoWindow.Remove(&LeftBtn);
|
||||||
|
gameinfoWindow.Remove(&RightBtn);
|
||||||
boxCov->SetZoomable(true);
|
boxCov->SetZoomable(true);
|
||||||
|
|
||||||
while(backBtn.GetState() != STATE_CLICKED && homeBtn.GetState() != STATE_CLICKED)
|
while(backBtn.GetState() != STATE_CLICKED && homeBtn.GetState() != STATE_CLICKED)
|
||||||
@ -876,16 +859,10 @@ int showGameInfo(char *ID)
|
|||||||
Sys_Reboot();
|
Sys_Reboot();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (page == 1)
|
gameinfoWindow.Append(&nextBtn);
|
||||||
{
|
gameinfoWindow.Append(&homeBtn);
|
||||||
gameinfoWindow.Append(&nextBtn);
|
gameinfoWindow.Append(&LeftBtn);
|
||||||
gameinfoWindow.Append(&homeBtn);
|
gameinfoWindow.Append(&RightBtn);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
gameinfoWindow2.Append(&nextBtn);
|
|
||||||
gameinfoWindow2.Append(&homeBtn);
|
|
||||||
}
|
|
||||||
|
|
||||||
boxCov->SetZoomable(false);
|
boxCov->SetZoomable(false);
|
||||||
boxCov->SetEffect(EFFECT_BOX_FLY_BACK, 100);
|
boxCov->SetEffect(EFFECT_BOX_FLY_BACK, 100);
|
||||||
@ -900,42 +877,16 @@ int showGameInfo(char *ID)
|
|||||||
if (page == 1)
|
if (page == 1)
|
||||||
{
|
{
|
||||||
HaltGui();
|
HaltGui();
|
||||||
gameinfoWindow.Remove(&nextBtn);
|
gameinfoWindow.Remove(&InfoWindow);
|
||||||
gameinfoWindow.Remove(&backBtn);
|
gameinfoWindow.Append(&txtWindow);
|
||||||
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);
|
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
page = 2;
|
page = 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HaltGui();
|
HaltGui();
|
||||||
gameinfoWindow2.Remove(&nextBtn);
|
gameinfoWindow.Remove(&txtWindow);
|
||||||
gameinfoWindow2.Remove(&backBtn);
|
gameinfoWindow.Append(&InfoWindow);
|
||||||
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);
|
|
||||||
ResumeGui();
|
ResumeGui();
|
||||||
page = 1;
|
page = 1;
|
||||||
}
|
}
|
||||||
@ -958,22 +909,8 @@ int showGameInfo(char *ID)
|
|||||||
}
|
}
|
||||||
else if (homeBtn.GetState() == STATE_CLICKED)
|
else if (homeBtn.GetState() == STATE_CLICKED)
|
||||||
{
|
{
|
||||||
if (page == 1)
|
choice = 2;
|
||||||
{
|
break;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1055,6 +992,33 @@ int showGameInfo(char *ID)
|
|||||||
return choice;
|
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
|
bool save_gamelist(int txt) // save gamelist
|
||||||
{
|
{
|
||||||
mainWindow->SetState(STATE_DISABLED);
|
mainWindow->SetState(STATE_DISABLED);
|
||||||
@ -1132,10 +1096,3 @@ bool save_gamelist(int txt) // save gamelist
|
|||||||
mainWindow->SetState(STATE_DEFAULT);
|
mainWindow->SetState(STATE_DEFAULT);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MemInfoPrompt()
|
|
||||||
{
|
|
||||||
char meminfotxt[200];
|
|
||||||
strlcpy(meminfotxt, MemInfo(), sizeof(meminfotxt));
|
|
||||||
WindowPrompt(0, meminfotxt, tr( "OK" ));
|
|
||||||
}
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#ifndef _GAMEINFO_H_
|
#ifndef _GAMEINFO_H_
|
||||||
#define _GAMEINFO_H_
|
#define _GAMEINFO_H_
|
||||||
|
|
||||||
int showGameInfo(char *ID);
|
int showGameInfo(int selectedGame);
|
||||||
bool save_gamelist(int txt);
|
bool save_gamelist(int txt);
|
||||||
void MemInfoPrompt();
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -258,6 +258,7 @@ bool CSettings::Save()
|
|||||||
fprintf(file, "HomeMenu = %d\n ", HomeMenu);
|
fprintf(file, "HomeMenu = %d\n ", HomeMenu);
|
||||||
fprintf(file, "MultiplePartitions = %d\n ", MultiplePartitions);
|
fprintf(file, "MultiplePartitions = %d\n ", MultiplePartitions);
|
||||||
fprintf(file, "USBPort = %d\n ", USBPort);
|
fprintf(file, "USBPort = %d\n ", USBPort);
|
||||||
|
fprintf(file, "CacheTitles = %d\n ", CacheTitles);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -470,6 +471,11 @@ bool CSettings::SetSetting(char *name, char *value)
|
|||||||
if (sscanf(value, "%d", &i) == 1) USBPort = i;
|
if (sscanf(value, "%d", &i) == 1) USBPort = i;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(name, "CacheTitles") == 0)
|
||||||
|
{
|
||||||
|
if (sscanf(value, "%d", &i) == 1) CacheTitles = i;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else if (strcmp(name, "patchcountrystrings") == 0)
|
else if (strcmp(name, "patchcountrystrings") == 0)
|
||||||
{
|
{
|
||||||
if (sscanf(value, "%d", &i) == 1) patchcountrystrings = i;
|
if (sscanf(value, "%d", &i) == 1) patchcountrystrings = i;
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
#define isMEM2Buffer(p) (((u32) p & 0x10000000) != 0)
|
#define isMEM2Buffer(p) (((u32) p & 0x10000000) != 0)
|
||||||
|
|
||||||
#define MAX_BUFFER_SECTORS 256
|
#define MAX_BUFFER_SECTORS 256
|
||||||
#define UMS_HEAPSIZE 0x1000
|
#define UMS_HEAPSIZE 0x8000
|
||||||
|
|
||||||
/* Variables */
|
/* Variables */
|
||||||
static char fs[] ATTRIBUTE_ALIGN(32) = "/dev/usb2";
|
static char fs[] ATTRIBUTE_ALIGN(32) = "/dev/usb2";
|
||||||
@ -96,7 +96,6 @@ s32 USBStorage2_Init(void)
|
|||||||
|
|
||||||
/* Initialize USB storage */
|
/* Initialize USB storage */
|
||||||
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_INIT, ":");
|
ret = IOS_IoctlvFormat(hid, fd, USB_IOCTL_UMS_INIT, ":");
|
||||||
if (ret < 0) goto err;
|
|
||||||
|
|
||||||
/* Get device capacity */
|
/* Get device capacity */
|
||||||
if (USBStorage2_GetCapacity(&hdd_sector_size) == 0)
|
if (USBStorage2_GetCapacity(&hdd_sector_size) == 0)
|
||||||
@ -105,7 +104,7 @@ s32 USBStorage2_Init(void)
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret; // 0->HDD, 1->DVD
|
return 0; // 0->HDD, 1->DVD
|
||||||
|
|
||||||
err:
|
err:
|
||||||
/* Close USB device */
|
/* Close USB device */
|
||||||
|
Loading…
Reference in New Issue
Block a user