*Found and fixed bug with Memory for Carousel (also was one in Grid)

*Added Carousel back in
*Changed UMS Heapsize which increases compatibility for some HDD Devices with cIOS38 Rev12

**NOTE: If anyone encounters any HDD detection problems which start from this rev on, make an issue and we can revert that thing.
This commit is contained in:
dimok321 2009-05-31 21:40:22 +00:00
parent e9f9882edc
commit 1ffee5a484
5 changed files with 151 additions and 141 deletions

View File

@ -24,7 +24,7 @@
#define SHIFT_SPEED 100
#define SPEED_STEP 4
#define PAGESIZE 9
#define SAFETY 320
#define SAFETY 9
extern const int vol;
@ -97,7 +97,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
game = new GuiButton * [pagesize];
bob = new int[pagesize];
coverImg = new GuiImage * [gameCnt];
cover = new GuiImageData * [gameCnt];
cover = new GuiImageData * [gameCnt];
for(int i=0; i<pagesize; i++) {
bob[i]=i;
@ -129,7 +129,7 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int gameCnt,
coverImg[i]->SetScale(SCALE);
coverImg[i]->SetWidescreen(CFG.widescreen);
}
for(int i=0; i < pagesize; i++) {
game[i] = new GuiButton(122,244);
game[i]->SetParent(this);
@ -330,7 +330,7 @@ void GuiGameCarousel::Update(GuiTrigger * t)
if(game[bob[i]]->GetState() == STATE_CLICKED) {
clickedItem = i;
}
}
// navigation
@ -354,19 +354,19 @@ void GuiGameCarousel::Update(GuiTrigger * t)
listOffset = (listOffset+1 < gameCnt) ? listOffset+1 : 0;
firstPic = (firstPic+1 < pagesize) ? firstPic+1 : 0;
for (int i=0; i<pagesize; i++) {
bob[i] = (firstPic+i)%pagesize;
}
game[bob[pagesize-1]]->SetImage(coverImg[(listOffset + pagesize-1) % gameCnt]);
game[bob[pagesize-1]]->SetPosition(0, RADIUS);
for (int i=0; i<pagesize; i++) {
game[bob[i]]->SetEffect(EFFECT_GOROUND, -speed, DEG_OFFSET, RADIUS, 270-(pagesize-2*i-3)*DEG_OFFSET/2, 1, 0, RADIUS);
}
speed+=SPEED_STEP;
}
@ -385,7 +385,7 @@ void GuiGameCarousel::Update(GuiTrigger * t)
for(int i=0; i<pagesize; i++) {
game[i]->StopEffect();
}
listOffset = (listOffset-1 < 0) ? gameCnt-1 : listOffset-1;
listOffset = (listOffset-1 < 0) ? gameCnt-1 : listOffset-1;
firstPic = (firstPic-1 < 0) ? pagesize-1 : firstPic-1;
for(int i=0; i<pagesize; i++) {
@ -438,7 +438,7 @@ void GuiGameCarousel::Reload(struct discHdr * l, int count)
game = new GuiButton * [pagesize];
bob = new int[pagesize];
coverImg = new GuiImage * [gameCnt];
cover = new GuiImageData * [gameCnt];
cover = new GuiImageData * [gameCnt];
for(int i=0; i<pagesize; i++) {
bob[i]=i;
@ -471,7 +471,7 @@ void GuiGameCarousel::Reload(struct discHdr * l, int count)
coverImg[i]->SetScale(SCALE);
coverImg[i]->SetWidescreen(CFG.widescreen);
}
for(int i=0; i < pagesize; i++) {
game[i] = new GuiButton(122,244);
game[i]->SetParent(this);

View File

@ -35,7 +35,6 @@ class GuiGameCarousel : public GuiElement
int * bob;
GuiButton ** game;
GuiText ** gameTxt;
GuiImage ** coverImg;
GuiImageData ** cover;

View File

@ -16,7 +16,7 @@
#include <string.h>
#include <sstream>
#define GAMESELECTSIZE 30
extern const int vol;
/**
@ -157,7 +157,13 @@ GuiGameGrid::~GuiGameGrid()
delete btnLeft;
delete trigA;
delete trigHeldA;
delete trigL;
delete trigR;
delete trigPlus;
delete trigMinus;
delete btnSoundClick;
delete btnSoundOver;
for(int i=0; i<pagesize; i++)
{
@ -168,6 +174,8 @@ GuiGameGrid::~GuiGameGrid()
}
delete [] gameIndex;
delete [] game;
delete [] cover;
delete [] coverImg;
}
void GuiGameGrid::SetFocus(int f)

View File

@ -3048,7 +3048,7 @@ static int MenuDiscList()
snprintf(imgPath, sizeof(imgPath), "%sarrangeGrid_gray.png", CFG.theme_path);
GuiImageData imgarrangeGrid_gray(imgPath, arrangeGrid_gray_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeList.png", CFG.theme_path);
GuiImageData imgarrangeList(imgPath, arrangeList_png);
GuiImageData imgarrangeList(imgPath, arrangeList_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeList_gray.png", CFG.theme_path);
GuiImageData imgarrangeList_gray(imgPath, arrangeList_gray_png);
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarousel.png", CFG.theme_path);
@ -3149,14 +3149,14 @@ static int MenuDiscList()
GuiButton countBtn(&countBtnImg_g,&countBtnImg_g, 2, 3, THEME.count_x, THEME.count_y, &trigA, &btnSoundOver, &btnClick,1);
countBtn.SetAlpha(180);
GuiImage listBtnImg(&imgarrangeList);
listBtnImg.SetWidescreen(CFG.widescreen);
GuiImage listBtnImg_g(&imgarrangeList_gray);
listBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton listBtn(&listBtnImg_g,&listBtnImg_g, 2, 3, THEME.list_x, THEME.list_y, &trigA, &btnSoundOver, &btnClick,1);
listBtn.SetAlpha(180);
listBtn.SetAlpha(180);
GuiImage gridBtnImg(&imgarrangeGrid);
gridBtnImg.SetWidescreen(CFG.widescreen);
@ -3164,7 +3164,7 @@ static int MenuDiscList()
gridBtnImg_g.SetWidescreen(CFG.widescreen);
GuiButton gridBtn(&gridBtnImg_g,&gridBtnImg_g, 2, 3, THEME.grid_x, THEME.grid_y, &trigA, &btnSoundOver, &btnClick,1);
gridBtn.SetAlpha(180);
GuiImage carouselBtnImg(&imgarrangeCarousel);
carouselBtnImg.SetWidescreen(CFG.widescreen);
@ -3190,24 +3190,24 @@ static int MenuDiscList()
countBtn.SetImage(&countBtnImg);
countBtn.SetImageOver(&countBtnImg);
countBtn.SetAlpha(255);
}
if (Settings.gameDisplay==list)
{
}
if (Settings.gameDisplay==list)
{
listBtn.SetImage(&listBtnImg);
listBtn.SetImageOver(&listBtnImg);
listBtn.SetAlpha(255);
}
else if (Settings.gameDisplay==grid)
{
listBtn.SetAlpha(255);
}
else if (Settings.gameDisplay==grid)
{
gridBtn.SetImage(&gridBtnImg);
gridBtn.SetImageOver(&gridBtnImg);
gridBtn.SetAlpha(255);
}
else if (Settings.gameDisplay==carousel)
{
gridBtn.SetAlpha(255);
}
else if (Settings.gameDisplay==carousel)
{
carouselBtn.SetImage(&carouselBtnImg);
carouselBtn.SetImageOver(&carouselBtnImg);
carouselBtn.SetAlpha(255);
carouselBtn.SetAlpha(255);
}
if (Settings.gameDisplay==list)
{
@ -3215,7 +3215,7 @@ static int MenuDiscList()
{
favoriteBtn.SetPosition(THEME.favorite_x, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x, THEME.abc_y);
countBtn.SetPosition(THEME.count_x, THEME.count_y);
countBtn.SetPosition(THEME.count_x, THEME.count_y);
listBtn.SetPosition(THEME.list_x, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x, THEME.carousel_y);
@ -3224,7 +3224,7 @@ static int MenuDiscList()
{
favoriteBtn.SetPosition(THEME.favorite_x-20, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4, THEME.count_y);
countBtn.SetPosition(THEME.count_x-4, THEME.count_y);
listBtn.SetPosition(THEME.list_x+4, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20, THEME.carousel_y);
@ -3236,7 +3236,7 @@ static int MenuDiscList()
{
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
@ -3245,7 +3245,7 @@ static int MenuDiscList()
{
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x+4-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20-THEME.sortBarOffset, THEME.carousel_y);
@ -3276,24 +3276,25 @@ static int MenuDiscList()
GuiGameGrid gameGrid(640,400, gameList, gameCnt, CFG.theme_path, bg_options_png, 0, 0);
gameGrid.SetPosition(0,20);
gameGrid.SetAlignment(ALIGN_LEFT, ALIGN_CENTRE);
//GuiGameCarousel gameCarousel(640, 400, gameList, gameCnt, CFG.theme_path, bg_options_png, startat, offset);
//gameCarousel.SetPosition(0,-20);
//gameCarousel.SetAlignment(ALIGN_LEFT, ALIGN_CENTRE);
gameGrid.SetAlignment(ALIGN_LEFT, ALIGN_CENTRE);
GuiGameCarousel gameCarousel(640, 400, gameList, gameCnt, CFG.theme_path, bg_options_png, startat, offset);
gameCarousel.SetPosition(0,-20);
gameCarousel.SetAlignment(ALIGN_LEFT, ALIGN_CENTRE);
GuiText clockTimeBack("88:88", 40, (GXColor){138, 138, 138, 40});
clockTimeBack.SetAlignment(THEME.clockAlign, ALIGN_TOP);
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
clockTimeBack.SetFont(fontClock);
if (Settings.gameDisplay==grid || Settings.gameDisplay==carousel) {
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);
}
GuiText clockTime(theTime, 40, (GXColor){138, 138, 138, 240});
clockTime.SetAlignment(THEME.clockAlign, ALIGN_TOP);
clockTime.SetPosition(THEME.clock_x, THEME.clock_y); clockTime.SetFont(fontClock);
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
clockTime.SetFont(fontClock);
if (Settings.gameDisplay==grid || Settings.gameDisplay==carousel) {
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
}
HaltGui();
@ -3319,7 +3320,7 @@ static int MenuDiscList()
}
w.Append(&favoriteBtn);
w.Append(&abcBtn);
w.Append(&countBtn);
w.Append(&countBtn);
w.Append(&listBtn);
w.Append(&gridBtn);
w.Append(&carouselBtn);
@ -3331,8 +3332,8 @@ static int MenuDiscList()
}
if (Settings.gameDisplay==list){mainWindow->Append(&gameBrowser);}
if (Settings.gameDisplay==grid){mainWindow->Append(&gameGrid);}
//if (Settings.gameDisplay==carousel){mainWindow->Append(&gameCarousel);}
if (Settings.gameDisplay==grid){mainWindow->Append(&gameGrid);}
if (Settings.gameDisplay==carousel){mainWindow->Append(&gameCarousel);}
mainWindow->Append(&w);
ResumeGui();
@ -3403,8 +3404,8 @@ static int MenuDiscList()
} else {
poweroffBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
//else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
}
@ -3435,8 +3436,8 @@ static int MenuDiscList()
} else {
homeBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
//else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
}
@ -3444,8 +3445,8 @@ static int MenuDiscList()
{ dataed++;
wiiBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
//else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
else if(installBtn.GetState() == STATE_CLICKED)
{
@ -3459,8 +3460,8 @@ static int MenuDiscList()
{
installBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
//else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
}
@ -3473,10 +3474,10 @@ static int MenuDiscList()
offset = gameBrowser.GetOffset();}
else if (Settings.gameDisplay==grid){
startat = gameGrid.GetSelectedOption();
offset = gameGrid.GetOffset();}
//else if (Settings.gameDisplay==carousel){
// startat = gameCarousel.GetSelectedOption();
// offset = gameCarousel.GetOffset();}
offset = gameGrid.GetOffset();}
else if (Settings.gameDisplay==carousel){
startat = gameCarousel.GetSelectedOption();
offset = gameCarousel.GetOffset();}
if(isSdInserted()) {
CFG_Load();
}
@ -3539,8 +3540,8 @@ static int MenuDiscList()
}
DownloadBtn.ResetState();
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
//else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}//end download
else if(settingsBtn.GetState() == STATE_CLICKED)
@ -3549,11 +3550,10 @@ static int MenuDiscList()
offset = gameBrowser.GetOffset();}
else if (Settings.gameDisplay==grid){
startat = gameGrid.GetSelectedOption();
offset = gameGrid.GetOffset();}
/*else if (Settings.gameDisplay==carousel){
startat = gameCarousel.GetSelectedOption();
offset = gameGrid.GetOffset();}
else if (Settings.gameDisplay==carousel){
startat = gameCarousel.GetSelectedOption();
offset = gameCarousel.GetOffset();}
*/
menu = MENU_SETTINGS;
break;
@ -3569,9 +3569,9 @@ static int MenuDiscList()
if (Settings.gameDisplay==list){
gameBrowser.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==grid){
gameGrid.Reload(gameList, gameCnt);}
//else if (Settings.gameDisplay==carousel){
// gameCarousel.Reload(gameList, gameCnt);}
gameGrid.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==carousel){
gameCarousel.Reload(gameList, gameCnt);}
gamecntTxt.SetTextf("%s: %i",LANGUAGE.Games, gameCnt);
selectedold = 1;
favoriteBtn.ResetState();
@ -3591,9 +3591,9 @@ static int MenuDiscList()
if (Settings.gameDisplay==list){
gameBrowser.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==grid){
gameGrid.Reload(gameList, gameCnt);}
//else if (Settings.gameDisplay==carousel){
// gameCarousel.Reload(gameList, gameCnt);}
gameGrid.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==carousel){
gameCarousel.Reload(gameList, gameCnt);}
selectedold = 1;
abcBtn.SetImage(&abcBtnImg);
abcBtn.SetImageOver(&abcBtnImg);
@ -3616,9 +3616,9 @@ static int MenuDiscList()
if (Settings.gameDisplay==list){
gameBrowser.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==grid){
gameGrid.Reload(gameList, gameCnt);}
//else if (Settings.gameDisplay==carousel){
//gameCarousel.Reload(gameList, gameCnt);}
gameGrid.Reload(gameList, gameCnt);}
else if (Settings.gameDisplay==carousel){
gameCarousel.Reload(gameList, gameCnt);}
selectedold = 1;
abcBtn.SetImage(&abcBtnImg_g);
abcBtn.SetImageOver(&abcBtnImg_g);
@ -3629,25 +3629,25 @@ static int MenuDiscList()
}
countBtn.ResetState();
}
}
else if(listBtn.GetState() == STATE_CLICKED) {
if (Settings.gameDisplay!=list){
if (Settings.gameDisplay==grid) {
mainWindow->Remove(&gameGrid);
mainWindow->Remove(&gameGrid);
gridBtn.SetImage(&gridBtnImg_g);
gridBtn.SetImageOver(&gridBtnImg_g);
gridBtn.SetAlpha(180);
}
/*if (Settings.gameDisplay==carousel) {
mainWindow->Remove(&gameCarousel);
gridBtn.SetAlpha(180);
}
if (Settings.gameDisplay==carousel) {
mainWindow->Remove(&gameCarousel);
carouselBtn.SetImage(&carouselBtnImg_g);
carouselBtn.SetImageOver(&carouselBtnImg_g);
carouselBtn.SetAlpha(180);
}*/
carouselBtn.SetAlpha(180);
}
HaltGui();
mainWindow->Remove(&w);
Settings.gameDisplay=list;
Settings.gameDisplay=list;
gameBrowser.Reload(gameList, gameCnt); // initialize before append
mainWindow->Append(&gameBrowser);
mainWindow->Append(&w);
@ -3659,14 +3659,14 @@ static int MenuDiscList()
{
favoriteBtn.SetPosition(THEME.favorite_x, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x, THEME.abc_y);
countBtn.SetPosition(THEME.count_x, THEME.count_y);
countBtn.SetPosition(THEME.count_x, THEME.count_y);
listBtn.SetPosition(THEME.list_x, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x, THEME.carousel_y);
} else {
favoriteBtn.SetPosition(THEME.favorite_x-20, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4, THEME.count_y);
countBtn.SetPosition(THEME.count_x-4, THEME.count_y);
listBtn.SetPosition(THEME.list_x+4, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20, THEME.carousel_y);
@ -3679,35 +3679,35 @@ static int MenuDiscList()
}
w.Append(&favoriteBtn);
w.Append(&abcBtn);
w.Append(&countBtn);
w.Append(&countBtn);
w.Append(&listBtn);
w.Append(&gridBtn);
w.Append(&carouselBtn);
w.Append(&DownloadBtn);
if(isSdInserted()) {
cfg_save_global();
}
}
}
listBtn.ResetState();
}
else if (gridBtn.GetState() == STATE_CLICKED) {
if (Settings.gameDisplay!=grid){
if (Settings.gameDisplay==list) {
mainWindow->Remove(&gameBrowser);
}
else if (gridBtn.GetState() == STATE_CLICKED) {
if (Settings.gameDisplay!=grid){
if (Settings.gameDisplay==list) {
mainWindow->Remove(&gameBrowser);
if (GameIDTxt) w.Remove(GameIDTxt);
if (GameRegionTxt) w.Remove(GameRegionTxt);
w.Remove(&DownloadBtn);
w.Remove(&DownloadBtn);
listBtn.SetImage(&listBtnImg_g);
listBtn.SetImageOver(&listBtnImg_g);
listBtn.SetAlpha(180);
}
/*if (Settings.gameDisplay==carousel) {
mainWindow->Remove(&gameCarousel);
listBtn.SetAlpha(180);
}
if (Settings.gameDisplay==carousel) {
mainWindow->Remove(&gameCarousel);
carouselBtn.SetImage(&carouselBtnImg_g);
carouselBtn.SetImageOver(&carouselBtnImg_g);
carouselBtn.SetAlpha(180);
}*/
carouselBtn.SetAlpha(180);
}
HaltGui();
mainWindow->Remove(&w);
Settings.gameDisplay=grid;
@ -3722,49 +3722,49 @@ static int MenuDiscList()
{
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
} else {
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x+4-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20-THEME.sortBarOffset, THEME.carousel_y);
}
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) {
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) {
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);
w.Append(&clockTime);
w.Append(&clockTimeBack);
}
}
w.Append(&favoriteBtn);
w.Append(&abcBtn);
w.Append(&countBtn);
w.Append(&countBtn);
w.Append(&listBtn);
w.Append(&gridBtn);
w.Append(&carouselBtn);
w.Append(&carouselBtn);
if(isSdInserted()) {
cfg_save_global();
}
}
gridBtn.ResetState();
}
else if (carouselBtn.GetState() == STATE_CLICKED) {
/*if (Settings.gameDisplay!=carousel){
if (Settings.gameDisplay==list)
mainWindow->Remove(&gameBrowser);
}
}
gridBtn.ResetState();
}
else if (carouselBtn.GetState() == STATE_CLICKED) {
if (Settings.gameDisplay!=carousel){
if (Settings.gameDisplay==list)
mainWindow->Remove(&gameBrowser);
if (GameIDTxt) w.Remove(GameIDTxt);
if (GameRegionTxt) w.Remove(GameRegionTxt);
w.Remove(&DownloadBtn);
w.Remove(&DownloadBtn);
listBtn.SetImage(&listBtnImg_g);
listBtn.SetImageOver(&listBtnImg_g);
listBtn.SetAlpha(180);
if (Settings.gameDisplay==grid)
mainWindow->Remove(&gameGrid);
listBtn.SetAlpha(180);
if (Settings.gameDisplay==grid)
mainWindow->Remove(&gameGrid);
gridBtn.SetImage(&gridBtnImg_g);
gridBtn.SetImageOver(&gridBtnImg_g);
gridBtn.SetAlpha(180);
@ -3782,53 +3782,56 @@ static int MenuDiscList()
{
favoriteBtn.SetPosition(THEME.favorite_x-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
countBtn.SetPosition(THEME.count_x-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x-THEME.sortBarOffset, THEME.carousel_y);
} else {
favoriteBtn.SetPosition(THEME.favorite_x-20-THEME.sortBarOffset, THEME.favorite_y);
abcBtn.SetPosition(THEME.abc_x-12-THEME.sortBarOffset, THEME.abc_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
countBtn.SetPosition(THEME.count_x-4-THEME.sortBarOffset, THEME.count_y);
listBtn.SetPosition(THEME.list_x+4-THEME.sortBarOffset, THEME.list_y);
gridBtn.SetPosition(THEME.grid_x+12-THEME.sortBarOffset, THEME.grid_y);
carouselBtn.SetPosition(THEME.carousel_x+20-THEME.sortBarOffset, THEME.carousel_y);
}
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) {
if((Settings.hddinfo == hr12)||(Settings.hddinfo == hr24)) {
clockTime.SetPosition(THEME.clock_x, THEME.clock_y+3);
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y+3);
w.Append(&clockTime);
w.Append(&clockTimeBack);
}
}
w.Append(&favoriteBtn);
w.Append(&abcBtn);
w.Append(&countBtn);
w.Append(&countBtn);
w.Append(&listBtn);
w.Append(&gridBtn);
w.Append(&carouselBtn);
w.Append(&carouselBtn);
if(isSdInserted()) {
cfg_save_global();
}
}
}
*/
carouselBtn.ResetState();
carouselBtn.ResetState();
}
if (Settings.gameDisplay==grid){
int selectimg;
selectimg = gameGrid.GetSelectedOption(); gameSelected = gameGrid.GetClickedOption(); }
/*
selectimg = gameGrid.GetSelectedOption();
gameSelected = gameGrid.GetClickedOption();
}
if (Settings.gameDisplay==carousel){
int selectimg;
selectimg = gameCarousel.GetSelectedOption(); gameSelected = gameCarousel.GetClickedOption(); }
*/
selectimg = gameCarousel.GetSelectedOption();
gameSelected = gameCarousel.GetClickedOption();
}
if (Settings.gameDisplay==list) {
//Get selected game under cursor
int selectimg;//, promptnumber;
char ID[4];
char IDfull[7];
selectimg = gameBrowser.GetSelectedOption(); gameSelected = gameBrowser.GetClickedOption();
selectimg = gameBrowser.GetSelectedOption();
gameSelected = gameBrowser.GetClickedOption();
if (gameSelected > 0) //if click occured
@ -3949,7 +3952,7 @@ static int MenuDiscList()
if (Settings.qboot == yes)//quickboot game
{
wiilight(0);
wiilight(0);
//////////save game play count////////////////
extern u8 favorite;
extern u16 count;
@ -4181,16 +4184,16 @@ static int MenuDiscList()
else if(choice == 0)
if (Settings.gameDisplay==list){gameBrowser.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
//else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid.SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel.SetFocus(1);}
}
}
}
HaltGui();
if (Settings.gameDisplay==list)mainWindow->Remove(&gameBrowser);
else if (Settings.gameDisplay==grid)mainWindow->Remove(&gameGrid);
//else if (Settings.gameDisplay==carousel)mainWindow->Remove(&gameCarousel);
else if (Settings.gameDisplay==grid)mainWindow->Remove(&gameGrid);
else if (Settings.gameDisplay==carousel)mainWindow->Remove(&gameCarousel);
mainWindow->Remove(&w);
ResumeGui();
return menu;

View File

@ -3,7 +3,7 @@
usbstorage_starlet.c -- USB mass storage support, inside starlet
Copyright (C) 2009 Kwiirk
If this driver is linked before libogc, this will replace the original
If this driver is linked before libogc, this will replace the original
usbstorage driver by svpe from libogc
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
@ -40,11 +40,11 @@ distribution.
#define USB_IOCTL_UMS_READ_STRESS (UMS_BASE+0x5)
#define USB_IOCTL_UMS_SET_VERBOSE (UMS_BASE+0x6)
#define UMS_HEAPSIZE 0x8000
#define UMS_HEAPSIZE 0x10000
/* Variables */
static char fs[] ATTRIBUTE_ALIGN(32) = "/dev/usb/ehc";
static s32 hid = -1, fd = -1;
static u32 sector_size;
@ -85,7 +85,7 @@ s32 USBStorage_Init(void)
if (hid < 0) {
hid = iosCreateHeap(UMS_HEAPSIZE);
if (hid < 0)
return IPC_ENOMEM;
return IPC_ENOMEM;
}
/* Open USB device */