- Manual cache cleanup in the menu to help a bit with issue 693. This is unfortunately not enough, we are dealing with ram fragmentation problems here :(
This commit is contained in:
@@ -115,6 +115,9 @@ public:
|
|||||||
// Returns a string prefixed with the resource path
|
// Returns a string prefixed with the resource path
|
||||||
string GetResourceFile(string filename);
|
string GetResourceFile(string filename);
|
||||||
|
|
||||||
|
// Manually Clear the zip cache
|
||||||
|
void clearZipCache();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
JFileSystem();
|
JFileSystem();
|
||||||
~JFileSystem();
|
~JFileSystem();
|
||||||
@@ -128,6 +131,7 @@ private:
|
|||||||
char *mPassword;
|
char *mPassword;
|
||||||
bool mZipAvailable;
|
bool mZipAvailable;
|
||||||
void preloadZip(const string& filename);
|
void preloadZip(const string& filename);
|
||||||
|
|
||||||
#if defined (PSP)
|
#if defined (PSP)
|
||||||
SceUID mFile;
|
SceUID mFile;
|
||||||
#else
|
#else
|
||||||
|
|||||||
Binary file not shown.
@@ -110,6 +110,11 @@ JFileSystem::JFileSystem()
|
|||||||
|
|
||||||
|
|
||||||
JFileSystem::~JFileSystem()
|
JFileSystem::~JFileSystem()
|
||||||
|
{
|
||||||
|
clearZipCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
void JFileSystem::clearZipCache()
|
||||||
{
|
{
|
||||||
DetachZipFile();
|
DetachZipFile();
|
||||||
|
|
||||||
@@ -120,7 +125,6 @@ JFileSystem::~JFileSystem()
|
|||||||
mZipCache.clear();
|
mZipCache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool JFileSystem::AttachZipFile(const string &zipfile, char *password /* = NULL */)
|
bool JFileSystem::AttachZipFile(const string &zipfile, char *password /* = NULL */)
|
||||||
{
|
{
|
||||||
if (mZipAvailable && mZipFile != NULL)
|
if (mZipAvailable && mZipFile != NULL)
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ public:
|
|||||||
//Refreshes all files in cache, for when mode/profile changes.
|
//Refreshes all files in cache, for when mode/profile changes.
|
||||||
virtual void Refresh() = 0;
|
virtual void Refresh() = 0;
|
||||||
|
|
||||||
|
//Manual clear of the cache
|
||||||
|
virtual void ClearUnlocked() = 0;
|
||||||
|
|
||||||
virtual unsigned int nowTime() = 0;
|
virtual unsigned int nowTime() = 0;
|
||||||
|
|
||||||
virtual JQuadPtr GetQuad(const string &quadName) = 0;
|
virtual JQuadPtr GetQuad(const string &quadName) = 0;
|
||||||
|
|||||||
@@ -133,6 +133,10 @@ void GameStateMenu::Start()
|
|||||||
hasChosenGameType = false;
|
hasChosenGameType = false;
|
||||||
mParent->gameType = GAME_TYPE_CLASSIC;
|
mParent->gameType = GAME_TYPE_CLASSIC;
|
||||||
|
|
||||||
|
//Manual clean up of some cache Data. Ideally those should clean themselves up, so this is kind of a hack for now
|
||||||
|
JFileSystem::GetInstance()->clearZipCache();
|
||||||
|
WResourceManager::Instance()->ClearUnlocked();
|
||||||
|
|
||||||
bgTexture = WResourceManager::Instance()->RetrieveTexture("menutitle.png", RETRIEVE_LOCK);
|
bgTexture = WResourceManager::Instance()->RetrieveTexture("menutitle.png", RETRIEVE_LOCK);
|
||||||
mBg = WResourceManager::Instance()->RetrieveQuad("menutitle.png", 0, 0, 256, 166); // Create background quad for rendering.
|
mBg = WResourceManager::Instance()->RetrieveQuad("menutitle.png", 0, 0, 256, 166); // Create background quad for rendering.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user