*Moved wii.spiffy360.com url in theme downloader a bit down (wasn't shown on some TVs)

*Moved font cache to mem2 (seems to fix the font issues)
*Moved thread start of free space getting out of the constructor (caused a few freezes on start up)
*Added destroy of sound handler when closing app
This commit is contained in:
dimok321 2011-01-02 13:56:24 +00:00
parent 2ea5a823e0
commit 9480208373
10 changed files with 374 additions and 382 deletions

View File

@ -146,7 +146,7 @@ extern "C" bool CheckFile(const char * filepath)
char dirnoslash[strlen(filepath)+2]; char dirnoslash[strlen(filepath)+2];
snprintf(dirnoslash, sizeof(dirnoslash), "%s", filepath); snprintf(dirnoslash, sizeof(dirnoslash), "%s", filepath);
if(dirnoslash[strlen(dirnoslash)-1] == '/') while(dirnoslash[strlen(dirnoslash)-1] == '/')
dirnoslash[strlen(dirnoslash)-1] = '\0'; dirnoslash[strlen(dirnoslash)-1] = '\0';
char * notRoot = strrchr(dirnoslash, '/'); char * notRoot = strrchr(dirnoslash, '/');

View File

@ -21,6 +21,7 @@
*/ */
#include "FreeTypeGX.h" #include "FreeTypeGX.h"
#include "memory/mem2.h"
using namespace std; using namespace std;
@ -228,7 +229,7 @@ void FreeTypeGX::loadGlyphData(FT_Bitmap *bmp, ftgxCharData *charData)
{ {
int length = ((((charData->textureWidth + 3) >> 2) * ((charData->textureHeight + 3) >> 2) * 32 * 2 + 31) & ~31); int length = ((((charData->textureWidth + 3) >> 2) * ((charData->textureHeight + 3) >> 2) * 32 * 2 + 31) & ~31);
uint8_t * glyphData = (uint8_t *) memalign(32, length); uint8_t * glyphData = (uint8_t *) MEM2_alloc(length);
if (!glyphData) return; if (!glyphData) return;
memset(glyphData, 0x00, length); memset(glyphData, 0x00, length);

View File

@ -24,7 +24,6 @@ GuiBGM::~GuiBGM()
ClearList(); ClearList();
} }
;
void GuiBGM::SetLoop(u8 l) void GuiBGM::SetLoop(u8 l)
{ {

View File

@ -1,3 +1,4 @@
#include "mem2.h" #include "mem2.h"
#include "mem2alloc.hpp" #include "mem2alloc.hpp"
@ -5,6 +6,7 @@
#include <string.h> #include <string.h>
#define MEM2_PRIORITY_SIZE 2097152 //2MB #define MEM2_PRIORITY_SIZE 2097152 //2MB
// Forbid the use of MEM2 through malloc // Forbid the use of MEM2 through malloc
u32 MALLOC_MEM2 = 0; u32 MALLOC_MEM2 = 0;
@ -15,75 +17,73 @@ static bool g_bigGoesToMem2 = false;
extern "C" extern "C"
{ {
void MEM2_takeBigOnes(bool b) void MEM2_takeBigOnes(bool b)
{ {
g_bigGoesToMem2 = b; g_bigGoesToMem2 = b;
} }
void MEM2_init(unsigned int mem2Size) void MEM2_init(unsigned int mem2Size)
{ {
g_mem2gp.init(mem2Size); g_mem2gp.init(mem2Size);
} }
void MEM2_cleanup(void) void MEM2_cleanup(void)
{ {
g_mem2gp.cleanup(); g_mem2gp.cleanup();
} }
void *MEM2_alloc(unsigned int s) void *MEM2_alloc(unsigned int s)
{ {
return g_mem2gp.allocate(s); return g_mem2gp.allocate(s);
} }
void MEM2_free(void *p) void MEM2_free(void *p)
{ {
g_mem2gp.release(p); g_mem2gp.release(p);
} }
void *MEM2_realloc(void *p, unsigned int s) void *MEM2_realloc(void *p, unsigned int s)
{ {
return g_mem2gp.reallocate(p, s); return g_mem2gp.reallocate(p, s);
} }
unsigned int MEM2_usableSize(void *p) unsigned int MEM2_usableSize(void *p)
{ {
return CMEM2Alloc::usableSize(p); return CMEM2Alloc::usableSize(p);
} }
unsigned int MEM2_freesize() unsigned int MEM2_freesize()
{ {
return g_mem2gp.FreeSize(); return g_mem2gp.FreeSize();
} }
extern __typeof( malloc ) __real_malloc; extern __typeof(malloc) __real_malloc;
extern __typeof( calloc ) __real_calloc; extern __typeof(calloc) __real_calloc;
extern __typeof( realloc ) __real_realloc; extern __typeof(realloc) __real_realloc;
extern __typeof( memalign ) __real_memalign; extern __typeof(memalign) __real_memalign;
extern __typeof( free ) __real_free; extern __typeof(free) __real_free;
extern __typeof( malloc_usable_size ) __real_malloc_usable_size; extern __typeof(malloc_usable_size) __real_malloc_usable_size;
void *__wrap_malloc(size_t size) void *__wrap_malloc(size_t size)
{ {
void *p; void *p;
if (g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE) if (g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE)
{ {
p = MEM2_alloc(size); p = MEM2_alloc(size);
if (p != 0) if (p != 0) {
{
return p; return p;
} }
return __real_malloc(size); return __real_malloc(size);
} }
p = __real_malloc(size); p = __real_malloc(size);
if (p != 0) if (p != 0) {
{
return p; return p;
} }
return MEM2_alloc(size); return MEM2_alloc(size);
} }
void *__wrap_calloc(size_t n, size_t size) void *__wrap_calloc(size_t n, size_t size)
{ {
void *p; void *p;
if (g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE) if (g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE)
{ {
@ -96,47 +96,44 @@ extern "C"
return __real_calloc(n, size); return __real_calloc(n, size);
} }
p = __real_calloc(n, size); p = __real_calloc(n, size);
if (p != 0) if (p != 0) {
{
return p; return p;
} }
p = MEM2_alloc(n * size); p = MEM2_alloc(n * size);
if (p != 0) if (p != 0) {
{
memset(p, 0, n * size); memset(p, 0, n * size);
} }
return p; return p;
} }
void *__wrap_memalign(size_t a, size_t size) void *__wrap_memalign(size_t a, size_t size)
{ {
void *p; void *p;
if (g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE) if (g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE)
{ {
if (a <= 32 && 32 % a == 0) if (a <= 32 && 32 % a == 0)
{ {
p = MEM2_alloc(size); p = MEM2_alloc(size);
if (p != 0) if (p != 0) {
{
return p; return p;
} }
} }
return __real_memalign(a, size); return __real_memalign(a, size);
} }
p = __real_memalign(a, size); p = __real_memalign(a, size);
if (p != 0 || a > 32 || 32 % a != 0) if (p != 0 || a > 32 || 32 % a != 0) {
{
return p; return p;
} }
return MEM2_alloc(size); return MEM2_alloc(size);
} }
void __wrap_free(void *p) void __wrap_free(void *p)
{ {
if (!p) return; if(!p)
return;
if (((u32) p & 0x10000000) != 0) if (((u32)p & 0x10000000) != 0)
{ {
MEM2_free(p); MEM2_free(p);
} }
@ -144,22 +141,20 @@ extern "C"
{ {
__real_free(p); __real_free(p);
} }
} }
void *__wrap_realloc(void *p, size_t size) void *__wrap_realloc(void *p, size_t size)
{ {
void *n; void *n;
// ptr from mem2 // ptr from mem2
if (((u32) p & 0x10000000) != 0 || (p == 0 && g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE)) if (((u32)p & 0x10000000) != 0 || (p == 0 && g_bigGoesToMem2 && size > MEM2_PRIORITY_SIZE))
{ {
n = MEM2_realloc(p, size); n = MEM2_realloc(p, size);
if (n != 0) if (n != 0) {
{
return n; return n;
} }
n = __real_malloc(size); n = __real_malloc(size);
if (n == 0) if (n == 0) {
{
return 0; return 0;
} }
if (p != 0) if (p != 0)
@ -171,13 +166,11 @@ extern "C"
} }
// ptr from malloc // ptr from malloc
n = __real_realloc(p, size); n = __real_realloc(p, size);
if (n != 0) if (n != 0) {
{
return n; return n;
} }
n = MEM2_alloc(size); n = MEM2_alloc(size);
if (n == 0) if (n == 0) {
{
return 0; return 0;
} }
if (p != 0) if (p != 0)
@ -186,12 +179,13 @@ extern "C"
__real_free(p); __real_free(p);
} }
return n; return n;
} }
size_t __wrap_malloc_usable_size(void *p) size_t __wrap_malloc_usable_size(void *p)
{ {
if (((u32) p & 0x10000000) != 0) return MEM2_usableSize(p); if (((u32)p & 0x10000000) != 0)
return MEM2_usableSize(p);
return __real_malloc_usable_size(p); return __real_malloc_usable_size(p);
} }
} ///extern "C" } ///extern "C"

View File

@ -5,12 +5,9 @@
#define __MEM2_H_ #define __MEM2_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C" {
{
#endif #endif
#include <gctypes.h>
void MEM2_init(unsigned int mem2Size); void MEM2_init(unsigned int mem2Size);
void MEM2_cleanup(void); void MEM2_cleanup(void);
void MEM2_takeBigOnes(bool b); void MEM2_takeBigOnes(bool b);

View File

@ -1,28 +1,23 @@
#include "mem2alloc.hpp" #include "mem2alloc.hpp"
#include <ogc/system.h> #include <ogc/system.h>
#include <algorithm> #include <algorithm>
#include <string.h> #include <string.h>
class LockMutex class LockMutex
{ {
mutex_t &m_mutex; mutex_t &m_mutex;
public: public:
LockMutex(mutex_t &m) : LockMutex(mutex_t &m) : m_mutex(m) { LWP_MutexLock(m_mutex); }
m_mutex(m) ~LockMutex(void) { LWP_MutexUnlock(m_mutex); }
{
LWP_MutexLock(m_mutex);
}
~LockMutex(void)
{
LWP_MutexUnlock(m_mutex);
}
}; };
void CMEM2Alloc::init(unsigned int size) void CMEM2Alloc::init(unsigned int size)
{ {
m_baseAddress = (SBlock *) (((u32) SYS_GetArena2Lo() + 31) & ~31); m_baseAddress = (SBlock *) (((u32)SYS_GetArena2Lo() + 31) & ~31);
m_endAddress = (SBlock *) ((char *) m_baseAddress + std::min(size * 0x100000, SYS_GetArena2Size() & ~31)); m_endAddress = (SBlock *) ((char *)m_baseAddress + std::min(size * 0x100000, SYS_GetArena2Size() & ~31));
if (m_endAddress > (SBlock *) 0x93300000) //rest is reserved for usb/usb2/network and other stuff... (0xE0000 bytes) if (m_endAddress > (SBlock *) 0x93300000) //rest is reserved for usb/usb2/network and other stuff... (0xE0000 bytes)
m_endAddress = (SBlock *) 0x93300000; m_endAddress = (SBlock *) 0x93300000;
SYS_SetArena2Lo(m_endAddress); SYS_SetArena2Lo(m_endAddress);
@ -31,8 +26,8 @@ void CMEM2Alloc::init(unsigned int size)
void CMEM2Alloc::init(void *addr, void *end) void CMEM2Alloc::init(void *addr, void *end)
{ {
m_baseAddress = (SBlock *) (((u32) addr + 31) & ~31); m_baseAddress = (SBlock *)(((u32)addr + 31) & ~31);
m_endAddress = (SBlock *) ((u32) end & ~31); m_endAddress = (SBlock *)((u32)end & ~31);
LWP_MutexInit(&m_mutex, 0); LWP_MutexInit(&m_mutex, 0);
} }
@ -42,7 +37,8 @@ void CMEM2Alloc::cleanup(void)
m_mutex = 0; m_mutex = 0;
m_first = 0; m_first = 0;
// Try to release the range we took through SYS functions // Try to release the range we took through SYS functions
if (SYS_GetArena2Lo() == m_endAddress) SYS_SetArena2Lo(m_baseAddress); if (SYS_GetArena2Lo() == m_endAddress)
SYS_SetArena2Lo(m_baseAddress);
m_baseAddress = 0; m_baseAddress = 0;
m_endAddress = 0; m_endAddress = 0;
} }
@ -50,51 +46,55 @@ void CMEM2Alloc::cleanup(void)
void CMEM2Alloc::clear(void) void CMEM2Alloc::clear(void)
{ {
m_first = 0; m_first = 0;
memset(m_baseAddress, 0, (u8 *) m_endAddress - (u8 *) m_endAddress); memset(m_baseAddress, 0, (u8 *)m_endAddress - (u8 *)m_endAddress);
} }
unsigned int CMEM2Alloc::usableSize(void *p) unsigned int CMEM2Alloc::usableSize(void *p)
{ {
return p == 0 ? 0 : ((SBlock *) p - 1)->s * sizeof(SBlock); return p == 0 ? 0 : ((SBlock *)p - 1)->s * sizeof (SBlock);
} }
void *CMEM2Alloc::allocate(unsigned int s) void *CMEM2Alloc::allocate(unsigned int s)
{ {
if (s == 0) s = 1; if (s == 0)
s = 1;
// //
LockMutex lock(m_mutex); LockMutex lock(m_mutex);
// //
s = (s - 1) / sizeof(SBlock) + 1; s = (s - 1) / sizeof (SBlock) + 1;
// First block // First block
if (m_first == 0) if (m_first == 0)
{ {
if (m_baseAddress + s + 1 >= m_endAddress) return 0; if (m_baseAddress + s + 1 >= m_endAddress)
return 0;
m_first = m_baseAddress; m_first = m_baseAddress;
m_first->next = 0; m_first->next = 0;
m_first->prev = 0; m_first->prev = 0;
m_first->s = s; m_first->s = s;
m_first->f = false; m_first->f = false;
return (void *) (m_first + 1); return (void *)(m_first + 1);
} }
// Search for a free block // Search for a free block
SBlock *i; SBlock *i;
SBlock *j; SBlock *j;
for (i = m_first; i != 0; i = i->next) for (i = m_first; i != 0; i = i->next)
{ {
if (i->f && i->s >= s) break; if (i->f && i->s >= s)
break;
j = i; j = i;
} }
// Create a new block // Create a new block
if (i == 0) if (i == 0)
{ {
i = j + j->s + 1; i = j + j->s + 1;
if (i + s + 1 >= m_endAddress) return 0; if (i + s + 1 >= m_endAddress)
return 0;
j->next = i; j->next = i;
i->prev = j; i->prev = j;
i->next = 0; i->next = 0;
i->s = s; i->s = s;
i->f = false; i->f = false;
return (void *) (i + 1); return (void *)(i + 1);
} }
// Reuse a free block // Reuse a free block
i->f = false; i->f = false;
@ -108,22 +108,25 @@ void *CMEM2Alloc::allocate(unsigned int s)
j->next = i->next; j->next = i->next;
j->prev = i; j->prev = i;
i->next = j; i->next = j;
if (j->next != 0) j->next->prev = j; if (j->next != 0)
j->next->prev = j;
} }
return (void *) (i + 1); return (void *)(i + 1);
} }
void CMEM2Alloc::release(void *p) void CMEM2Alloc::release(void *p)
{ {
if (p == 0) return; if (p == 0)
return;
LockMutex lock(m_mutex); LockMutex lock(m_mutex);
SBlock *i = (SBlock *) p - 1; SBlock *i = (SBlock *)p - 1;
i->f = true; i->f = true;
// If there are no other blocks following yet, // If there are no other blocks following yet,
// set the remaining size to free size. - Dimok // set the remaining size to free size. - Dimok
if (i->next == 0) i->s = m_endAddress - i - 1; if(i->next == 0)
i->s = m_endAddress - i - 1;
// Merge with previous block // Merge with previous block
if (i->prev != 0 && i->prev->f) if (i->prev != 0 && i->prev->f)
@ -131,14 +134,16 @@ void CMEM2Alloc::release(void *p)
i = i->prev; i = i->prev;
i->s += i->next->s + 1; i->s += i->next->s + 1;
i->next = i->next->next; i->next = i->next->next;
if (i->next != 0) i->next->prev = i; if (i->next != 0)
i->next->prev = i;
} }
// Merge with next block // Merge with next block
if (i->next != 0 && i->next->f) if (i->next != 0 && i->next->f)
{ {
i->s += i->next->s + 1; i->s += i->next->s + 1;
i->next = i->next->next; i->next = i->next->next;
if (i->next != 0) i->next->prev = i; if (i->next != 0)
i->next->prev = i;
} }
} }
@ -148,11 +153,13 @@ void *CMEM2Alloc::reallocate(void *p, unsigned int s)
SBlock *j; SBlock *j;
void *n; void *n;
if (s == 0) s = 1; if (s == 0)
if (p == 0) return allocate(s); s = 1;
if (p == 0)
return allocate(s);
i = (SBlock *) p - 1; i = (SBlock *)p - 1;
s = (s - 1) / sizeof(SBlock) + 1; s = (s - 1) / sizeof (SBlock) + 1;
{ {
LockMutex lock(m_mutex); LockMutex lock(m_mutex);
@ -174,7 +181,8 @@ void *CMEM2Alloc::reallocate(void *p, unsigned int s)
// Merge // Merge
i->s += i->next->s + 1; i->s += i->next->s + 1;
i->next = i->next->next; i->next = i->next->next;
if (i->next != 0) i->next->prev = i; if (i->next != 0)
i->next->prev = i;
} }
// Size <= current size // Size <= current size
if (i->s >= s) if (i->s >= s)
@ -189,15 +197,17 @@ void *CMEM2Alloc::reallocate(void *p, unsigned int s)
j->next = i->next; j->next = i->next;
j->prev = i; j->prev = i;
i->next = j; i->next = j;
if (j->next != 0) j->next->prev = j; if (j->next != 0)
j->next->prev = j;
} }
return p; return p;
} }
} }
// Size > current size // Size > current size
n = allocate(s * sizeof(SBlock)); n = allocate(s * sizeof (SBlock));
if (n == 0) return 0; if (n == 0)
memcpy(n, p, i->s * sizeof(SBlock)); return 0;
memcpy(n, p, i->s * sizeof (SBlock));
release(p); release(p);
return n; return n;
} }
@ -206,21 +216,23 @@ unsigned int CMEM2Alloc::FreeSize()
{ {
LockMutex lock(m_mutex); LockMutex lock(m_mutex);
if (m_first == 0) return (const char *) m_endAddress - (const char *) m_baseAddress; if (m_first == 0)
return (const char *) m_endAddress - (const char *) m_baseAddress;
SBlock *i; SBlock *i;
unsigned int size = 0; unsigned int size = 0;
for (i = m_first; i != 0; i = i->next) for(i = m_first; i != 0; i = i->next)
{ {
if (i->f && i->next != 0) if(i->f && i->next != 0)
size += i->s; size += i->s;
else if (i->f && i->next == 0) else if(i->f && i->next == 0)
size += m_endAddress - i - 1; size += m_endAddress - i - 1;
else if (!i->f && i->next == 0) size += m_endAddress - i - i->s - 1; else if(!i->f && i->next == 0)
size += m_endAddress - i - i->s - 1;
} }
return size * sizeof(SBlock); return size*sizeof(SBlock);
} }

View File

@ -8,7 +8,7 @@
class CMEM2Alloc class CMEM2Alloc
{ {
public: public:
void *allocate(unsigned int s); void *allocate(unsigned int s);
void release(void *p); void release(void *p);
void *reallocate(void *p, unsigned int s); void *reallocate(void *p, unsigned int s);
@ -17,38 +17,25 @@ class CMEM2Alloc
void cleanup(void); void cleanup(void);
void clear(void); void clear(void);
static unsigned int usableSize(void *p); static unsigned int usableSize(void *p);
void forceEndAddress(void *newAddr) void forceEndAddress(void *newAddr) { m_endAddress = (SBlock *)newAddr; }
{ void *getEndAddress(void) const { return m_endAddress; }
m_endAddress = (SBlock *) newAddr; void info(void *&address, unsigned int &size) const { address = m_baseAddress; size = (const char *)m_endAddress - (const char *)m_baseAddress; }
}
void *getEndAddress(void) const
{
return m_endAddress;
}
void info(void *&address, unsigned int &size) const
{
address = m_baseAddress;
size = (const char *) m_endAddress - (const char *) m_baseAddress;
}
unsigned int FreeSize(); unsigned int FreeSize();
// //
CMEM2Alloc(void) : CMEM2Alloc(void) : m_baseAddress(0), m_endAddress(0), m_first(0), m_mutex(0) { }
m_baseAddress(0), m_endAddress(0), m_first(0), m_mutex(0) private:
{
}
private:
struct SBlock struct SBlock
{ {
unsigned int s; unsigned int s;
SBlock *next; SBlock *next;
SBlock *prev; SBlock *prev;
bool f; bool f;
}__attribute__((aligned(32))); } __attribute__((aligned(32)));
SBlock *m_baseAddress; SBlock *m_baseAddress;
SBlock *m_endAddress; SBlock *m_endAddress;
SBlock *m_first; SBlock *m_first;
mutex_t m_mutex; mutex_t m_mutex;
private: private:
CMEM2Alloc(const CMEM2Alloc &); CMEM2Alloc(const CMEM2Alloc &);
}; };

View File

@ -108,13 +108,6 @@ GameBrowseMenu::GameBrowseMenu()
usedSpaceTxt->SetAlignment(thAlign("center - hdd info align hor"), thAlign("top - hdd info align ver")); usedSpaceTxt->SetAlignment(thAlign("center - hdd info align hor"), thAlign("top - hdd info align ver"));
usedSpaceTxt->SetPosition(thInt("0 - hdd info pos x"), thInt("400 - hdd info pos y")); usedSpaceTxt->SetPosition(thInt("0 - hdd info pos x"), thInt("400 - hdd info pos y"));
if(Settings.ShowFreeSpace)
{
HDDSizeCallback.SetCallback(this, &GameBrowseMenu::UpdateFreeSpace);
ThreadedTask::Instance()->AddCallback(&HDDSizeCallback);
ThreadedTask::Instance()->Execute();
}
gamecntTxt = new GuiText((char *) NULL, 18, thColor("r=55 g=190 b=237 a=255 - game count color")); gamecntTxt = new GuiText((char *) NULL, 18, thColor("r=55 g=190 b=237 a=255 - game count color"));
gamecntBtn = new GuiButton(100, 18); gamecntBtn = new GuiButton(100, 18);
gamecntBtn->SetAlignment(thAlign("center - game count align hor"), thAlign("top - game count align ver")); gamecntBtn->SetAlignment(thAlign("center - game count align hor"), thAlign("top - game count align ver"));
@ -716,6 +709,13 @@ int GameBrowseMenu::Show()
{ {
int menu = MENU_NONE; int menu = MENU_NONE;
if(Settings.ShowFreeSpace)
{
HDDSizeCallback.SetCallback(this, &GameBrowseMenu::UpdateFreeSpace);
ThreadedTask::Instance()->AddCallback(&HDDSizeCallback);
ThreadedTask::Instance()->Execute();
}
while(menu == MENU_NONE) while(menu == MENU_NONE)
{ {
usleep(100); usleep(100);

View File

@ -13,6 +13,7 @@
#include "usbloader/playlog.h" #include "usbloader/playlog.h"
#include "usbloader/wbfs.h" #include "usbloader/wbfs.h"
#include "themes/CTheme.h" #include "themes/CTheme.h"
#include "SoundOperations/SoundHandler.hpp"
#include "utils/ThreadedTask.hpp" #include "utils/ThreadedTask.hpp"
#include "audio.h" #include "audio.h"
#include "lstub.h" #include "lstub.h"
@ -67,11 +68,12 @@ void AppCleanUp(void)
Settings.Save(); Settings.Save();
ExitGUIThreads(); ExitGUIThreads();
StopGX();
delete bgMusic;
delete btnSoundClick; delete btnSoundClick;
delete btnSoundOver; delete btnSoundOver;
delete btnSoundClick2; delete btnSoundClick2;
delete bgMusic;
delete background; delete background;
delete bgImg; delete bgImg;
delete mainWindow; delete mainWindow;
@ -83,9 +85,9 @@ void AppCleanUp(void)
Theme::CleanUp(); Theme::CleanUp();
NewTitles::DestroyInstance(); NewTitles::DestroyInstance();
ThreadedTask::DestroyInstance(); ThreadedTask::DestroyInstance();
SoundHandler::DestroyInstance();
DeinitNetwork(); DeinitNetwork();
StopGX();
ShutdownAudio(); ShutdownAudio();
ResourceManager::DestroyInstance(); ResourceManager::DestroyInstance();

View File

@ -47,7 +47,7 @@ ThemeDownloader::ThemeDownloader()
urlTxt = new GuiText(tr( "Themes by www.spiffy360.com" ), 22, (GXColor) {255, 255, 255, 255}); urlTxt = new GuiText(tr( "Themes by www.spiffy360.com" ), 22, (GXColor) {255, 255, 255, 255});
urlTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP); urlTxt->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
urlTxt->SetPosition(350, 3); urlTxt->SetPosition(350, 12);
Append(urlTxt); Append(urlTxt);
for(int i = 0; i < 4; ++i) for(int i = 0; i < 4; ++i)