Fixed thi Install-Bug ... i think

This commit is contained in:
ardi@ist-einmalig.de 2009-05-11 18:45:33 +00:00
parent 319c82e588
commit fc20580add
5 changed files with 35 additions and 20 deletions

View File

@ -376,7 +376,7 @@ class GuiElement
protected:
void Lock();
void Unlock();
mutex_t mutex;
static mutex_t mutex;
friend class SimpleLock;
//int position2; //! B Scrollbariable
@ -422,9 +422,9 @@ public:
private:
GuiElement *element;
};
//#define LOCK(e) SimpleLock LOCK(e)
#define LOCK(e) SimpleLock LOCK(e)
//disabled because of problems with FW 4.0
#define LOCK(e)
//#define LOCK(e)
//!Allows GuiElements to be grouped together into a "window"
class GuiWindow : public GuiElement

View File

@ -13,6 +13,7 @@
/**
* Constructor for the Object class.
*/
mutex_t GuiElement::mutex = 0;
GuiElement::GuiElement()
{
xoffset = 0;
@ -55,8 +56,7 @@ GuiElement::GuiElement()
// default alignment - align to top left
alignmentVert = ALIGN_TOP;
alignmentHor = ALIGN_LEFT;
LWP_MutexInit(&mutex, true);
if(mutex == 0) LWP_MutexInit(&mutex, true);
}
/**
@ -64,7 +64,7 @@ GuiElement::GuiElement()
*/
GuiElement::~GuiElement()
{
LWP_MutexDestroy(mutex);
// LWP_MutexDestroy(mutex);
}
void GuiElement::SetParent(GuiElement * e)

View File

@ -67,7 +67,7 @@ GuiText::~GuiText()
{
if(text)
{
delete text;
delete [] text;
text = NULL;
}
}
@ -76,7 +76,7 @@ void GuiText::SetText(const char * t)
{
LOCK(this);
if(text)
delete text;
delete [] text;
text = NULL;
if(t)

View File

@ -112,7 +112,7 @@ main(int argc, char *argv[])
s32 ret2;
__io_wiisd.startup();
fatMountSimple("SD", &__io_wiisd);

View File

@ -1341,16 +1341,22 @@ void
ShowProgress (s32 done, s32 total)
{
static time_t start;
static time_t start;
static u32 expected;
f32 percent; //, size;
u32 d, h, m, s;
static int last_percent;
static u32 last_d;
static int last_gamesizedone;
//first time
if (!done) {
start = time(0);
expected = 300;
last_percent = -1;
last_d = 0;
last_gamesizedone = -1;
}
//Elapsed time
@ -1374,19 +1380,31 @@ ShowProgress (s32 done, s32 total)
percent = (done * 100.0) / total;
//size = (hdd->wbfs_sec_sz / GB_SIZE) * total;
sprintf(prozent, "%0.2f", percent);
prTxt.SetText(prozent);
if(last_percent != (int)(percent*100))
{
last_percent = (int)(percent*100);
sprintf(prozent, "%d.%.2d", last_percent/100, last_percent%100);
prTxt.SetText(prozent);
}
//prTxt.SetFont(fontClock);
sprintf(timet,"Time left: %d:%02d:%02d",h,m,s);
timeTxt.SetText(timet);
if(last_d != d)
{
last_d = d;
sprintf(timet,"Time left: %d:%02d:%02d",h,m,s);
timeTxt.SetText(timet);
}
float gamesizedone = 0.00;
gamesizedone = gamesize * done/total;
sprintf(sizeshow,"%0.2fGB/%0.2fGB", gamesizedone, gamesize);
sizeTxt.SetText(sizeshow);
if(last_gamesizedone != (int)(gamesizedone*100));
{
last_gamesizedone = (int)(gamesizedone*100);
int int_gamesize = (int)(gamesize*100);
sprintf(sizeshow,"%d.%.2dGB/%d.%.2dGB", last_gamesizedone/100, last_gamesizedone%100, int_gamesize/100, int_gamesize%100);
sizeTxt.SetText(sizeshow);
}
// timeTxt.SetFont(fontClock);
if ((Settings.wsprompt == yes) && (CFG.widescreen)){
progressbarImg.SetTile(80*done/total);}
@ -2218,7 +2236,6 @@ static int MenuDiscList()
//CLOCK
struct tm * timeinfo;
char theTime[80];
int counter = 0;
time_t lastrawtime=0;
WBFS_DiskSpace(&used, &freespace);
@ -2496,8 +2513,6 @@ static int MenuDiscList()
strftime(theTime, sizeof(theTime), "%H %M", timeinfo);
clockTime.SetText(theTime);
}
counter++;
#ifdef HW_RVL
for(i=0; i < 4; i++)
{