From 3148a25f3ad5423ba8ed239fb6afe4337fe3b2aa Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew" Date: Sun, 10 Jul 2011 13:51:39 +0000 Subject: [PATCH] - 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 :( --- JGE/include/JFileSystem.h | 4 ++++ JGE/lib/psp/libhgetools.a | Bin 35236 -> 35236 bytes JGE/src/JFileSystem.cpp | 6 +++++- projects/mtg/include/WResourceManager.h | 3 +++ projects/mtg/src/GameStateMenu.cpp | 4 ++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/JGE/include/JFileSystem.h b/JGE/include/JFileSystem.h index 036848195..8ce68fdd3 100644 --- a/JGE/include/JFileSystem.h +++ b/JGE/include/JFileSystem.h @@ -115,6 +115,9 @@ public: // Returns a string prefixed with the resource path string GetResourceFile(string filename); + // Manually Clear the zip cache + void clearZipCache(); + protected: JFileSystem(); ~JFileSystem(); @@ -128,6 +131,7 @@ private: char *mPassword; bool mZipAvailable; void preloadZip(const string& filename); + #if defined (PSP) SceUID mFile; #else diff --git a/JGE/lib/psp/libhgetools.a b/JGE/lib/psp/libhgetools.a index 58e443ed04dd447c84696f33d2b8d1157fe2b13d..c9c14580d72edb85b7122eda0e6d1dcdb87b5252 100644 GIT binary patch delta 110 zcmZ27nQ6&nrU}yQW@aWPrWPg}m5#DQ*@m0nvH#?Pa*Q^=6H?WLaVEbL65niSbBz@y fu$j-vlmp5!p8SqoY;%H_uq0H#1S~KiSwsy0N(wmPSS!m5#DQ*oKyy-?9JXf=U={ekY`=3FAzDCnUbv(B>K| lRKRdEpOYyE8^nysZ`s8+CwK`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); mBg = WResourceManager::Instance()->RetrieveQuad("menutitle.png", 0, 0, 256, 166); // Create background quad for rendering.