*Small changes

This commit is contained in:
dimok321 2009-06-13 09:51:01 +00:00
parent 6d082b7c66
commit 33eaefe81e
3 changed files with 26 additions and 37 deletions

View File

@ -118,6 +118,7 @@ UpdateGUI (void *arg)
} }
else else
{ {
if(!ExitRequested) {
mainWindow->Draw(); mainWindow->Draw();
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0 && mainWindow->GetState() != STATE_DISABLED) if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0 && mainWindow->GetState() != STATE_DISABLED)
mainWindow->DrawTooltip(); mainWindow->DrawTooltip();
@ -140,8 +141,7 @@ UpdateGUI (void *arg)
for(int i=0; i < 4; i++) for(int i=0; i < 4; i++)
mainWindow->Update(&userInput[i]); mainWindow->Update(&userInput[i]);
if(ExitRequested) } else {
{
for(int a = 5; a < 255; a += 10) for(int a = 5; a < 255; a += 10)
{ {
mainWindow->Draw(); mainWindow->Draw();
@ -209,9 +209,9 @@ static int MenuDiscList()
WBFS_DiskSpace(&used, &freespace); WBFS_DiskSpace(&used, &freespace);
if (!gameCnt) { //if there is no list of games to display if (!gameCnt) { //if there is no list of games to display
nolist = 1; nolist = 1;
} }
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
@ -246,13 +246,13 @@ static int MenuDiscList()
snprintf(imgPath, sizeof(imgPath), "%sbattery_bar.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sbattery_bar.png", CFG.theme_path);
GuiImageData batteryBar(imgPath, battery_bar_png); GuiImageData batteryBar(imgPath, battery_bar_png);
snprintf(imgPath, sizeof(imgPath), "%sfavIcon.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sfavIcon.png", CFG.theme_path);
GuiImageData imgfavIcon(imgPath, favIcon_png); GuiImageData imgfavIcon(imgPath, favIcon_png);
snprintf(imgPath, sizeof(imgPath), "%sfavIcon_gray.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sfavIcon_gray.png", CFG.theme_path);
GuiImageData imgfavIcon_gray(imgPath, favIcon_gray_png); GuiImageData imgfavIcon_gray(imgPath, favIcon_gray_png);
snprintf(imgPath, sizeof(imgPath), "%sabcIcon.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sabcIcon.png", CFG.theme_path);
GuiImageData imgabcIcon(imgPath, abcIcon_png); GuiImageData imgabcIcon(imgPath, abcIcon_png);
snprintf(imgPath, sizeof(imgPath), "%sabcIcon_gray.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sabcIcon_gray.png", CFG.theme_path);
GuiImageData imgabcIcon_gray(imgPath, abcIcon_gray_png); GuiImageData imgabcIcon_gray(imgPath, abcIcon_gray_png);
snprintf(imgPath, sizeof(imgPath), "%splayCountIcon.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%splayCountIcon.png", CFG.theme_path);
GuiImageData imgplayCountIcon(imgPath, playCountIcon_png); GuiImageData imgplayCountIcon(imgPath, playCountIcon_png);
@ -271,15 +271,15 @@ static int MenuDiscList()
snprintf(imgPath, sizeof(imgPath), "%sarrangeCarousel_gray.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sarrangeCarousel_gray.png", CFG.theme_path);
GuiImageData imgarrangeCarousel_gray(imgPath, arrangeCarousel_gray_png); GuiImageData imgarrangeCarousel_gray(imgPath, arrangeCarousel_gray_png);
GuiTrigger trigA; GuiTrigger trigA;
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
GuiTrigger trigHome; GuiTrigger trigHome;
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0); trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
GuiTrigger trig2; GuiTrigger trig2;
trig2.SetButtonOnlyTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_X, 0); trig2.SetButtonOnlyTrigger(-1, WPAD_BUTTON_2 | WPAD_CLASSIC_BUTTON_X, 0);
char spaceinfo[30]; char spaceinfo[30];
sprintf(spaceinfo,"%.2fGB %s %.2fGB %s",freespace,LANGUAGE.of,(freespace+used),LANGUAGE.free); sprintf(spaceinfo,"%.2fGB %s %.2fGB %s",freespace,LANGUAGE.of,(freespace+used),LANGUAGE.free);
GuiText usedSpaceTxt(spaceinfo, 18, (GXColor){THEME.info_r, THEME.info_g, THEME.info_b, 255}); GuiText usedSpaceTxt(spaceinfo, 18, (GXColor){THEME.info_r, THEME.info_g, THEME.info_b, 255});
usedSpaceTxt.SetAlignment(THEME.hddInfoAlign, ALIGN_TOP); usedSpaceTxt.SetAlignment(THEME.hddInfoAlign, ALIGN_TOP);
@ -327,7 +327,7 @@ static int MenuDiscList()
if (Settings.wsprompt == yes) if (Settings.wsprompt == yes)
poweroffBtnTT.SetWidescreen(CFG.widescreen); poweroffBtnTT.SetWidescreen(CFG.widescreen);
GuiImage poweroffBtnImg(&btnpwroff); GuiImage poweroffBtnImg(&btnpwroff);
GuiImage poweroffBtnImgOver(&btnpwroffOver); GuiImage poweroffBtnImgOver(&btnpwroffOver);
poweroffBtnImg.SetWidescreen(CFG.widescreen); poweroffBtnImg.SetWidescreen(CFG.widescreen);
poweroffBtnImgOver.SetWidescreen(CFG.widescreen); poweroffBtnImgOver.SetWidescreen(CFG.widescreen);
@ -1816,26 +1816,20 @@ int MainMenu(int menu)
break; break;
} }
} }
ExitGUIThreads();
ExitGUIThreads();
bgMusic->Stop(); bgMusic->Stop();
delete bgMusic; delete bgMusic;
delete background; delete background;
delete bgImg; delete bgImg;
delete mainWindow; delete mainWindow;
mainWindow = NULL; for(int i = 0; i < 4; i++)
delete pointer[0]; delete pointer[i];
delete pointer[1];
delete pointer[2];
delete pointer[3];
delete GameRegionTxt; delete GameRegionTxt;
delete GameIDTxt; delete GameIDTxt;
delete cover; delete cover;
delete coverImg; delete coverImg;
StopGX();
ShutdownAudio();
int ret = 0; int ret = 0;
struct discHdr *header = &gameList[gameSelected]; struct discHdr *header = &gameList[gameSelected];
@ -1879,10 +1873,7 @@ int MainMenu(int menu)
break; break;
} }
if(iosChoice == i223 || networkisinitialized == 1 if(IOS_GetVersion() != ios2 || networkisinitialized == 1) {
|| (iosChoice == i249 && Settings.cios == 1)
|| (iosChoice == i222 && Settings.cios == 0)) {
if(networkisinitialized == 1) ResumeGui();
ret = Sys_IosReload(ios2); ret = Sys_IosReload(ios2);
if(ret < 0) { if(ret < 0) {
Sys_IosReload(249); Sys_IosReload(249);
@ -1893,10 +1884,6 @@ int MainMenu(int menu)
ret = Disc_Open(); ret = Disc_Open();
if(ret < 0) Sys_BackToLoader(); if(ret < 0) Sys_BackToLoader();
SDCard_deInit();
USBDevice_deInit();
USBStorage_Deinit();
u8 errorfixer002 = 0; u8 errorfixer002 = 0;
switch(fix002) switch(fix002)
{ {
@ -2026,7 +2013,13 @@ int MainMenu(int menu)
break; break;
} }
ShutdownAudio();
StopGX();
SDCard_deInit();
USBDevice_deInit();
USBStorage_Deinit();
mload_close(); mload_close();
ret = Disc_WiiBoot(videoselected, cheat, vipatch, Settings.patchcountrystrings, errorfixer002); ret = Disc_WiiBoot(videoselected, cheat, vipatch, Settings.patchcountrystrings, errorfixer002);
if (ret < 0) { if (ret < 0) {
Sys_LoadMenu(); Sys_LoadMenu();

View File

@ -1,7 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <ogcsys.h> #include <ogcsys.h>
#include <network.h>
#include "http.h" #include "http.h"

View File

@ -32,9 +32,6 @@ void __Disc_SetLowMem(void)
*(vu32 *)0x800000F8 = 0x0E7BE2C0; *(vu32 *)0x800000F8 = 0x0E7BE2C0;
*(vu32 *)0x800000FC = 0x2B73A840; *(vu32 *)0x800000FC = 0x2B73A840;
/** online check **/
memcpy((u32*) 0x80003180, (u32*) 0x80000000, 4);
/* Copy disc ID */ /* Copy disc ID */
memcpy((void *)0x80003180, (void *)0x80000000, 4); memcpy((void *)0x80003180, (void *)0x80000000, 4);