Jeck - Cache Leakfix. Quads now individually lock/unlock. Demo still crashes PSP.
This commit is contained in:
@@ -23,8 +23,8 @@ enum ENUM_WRES_INFO{
|
||||
enum ENUM_RETRIEVE_STYLE{
|
||||
RETRIEVE_EXISTING, //Only returns a resource if it already exists. Does not lock or unlock.
|
||||
RETRIEVE_NORMAL, //Returns or creates a resource. Does not change lock status.
|
||||
RETRIEVE_LOCK, //As above, locks cached resource. Not for quads.
|
||||
RETRIEVE_UNLOCK, //As above, unlocks cached resource. Not for quads.
|
||||
RETRIEVE_LOCK, //As above, locks cached resource.
|
||||
RETRIEVE_UNLOCK, //As above, unlocks cached resource.
|
||||
RETRIEVE_RESOURCE, //Only retrieves a managed resource. Does not make a new one.
|
||||
RETRIEVE_VRAM, //Retrieve it, and use vram if have to we create it. Must still remove it.
|
||||
RETRIEVE_MANAGE, //Makes resource permanent.
|
||||
@@ -104,7 +104,9 @@ protected:
|
||||
#endif
|
||||
};
|
||||
|
||||
struct WManagedQuad {
|
||||
class WManagedQuad {
|
||||
public:
|
||||
WManagedQuad() {texture = NULL;};
|
||||
WCachedTexture * texture;
|
||||
string resname;
|
||||
};
|
||||
@@ -183,7 +185,7 @@ private:
|
||||
WCache<WCachedTexture,JTexture> textureWCache;
|
||||
WCache<WCachedSample,JSample> sampleWCache;
|
||||
WCache<WCachedParticles,hgeParticleSystemInfo> psiWCache;
|
||||
vector<WManagedQuad> managedQuads;
|
||||
vector<WManagedQuad*> managedQuads;
|
||||
|
||||
//Statistics of record.
|
||||
unsigned int lastTime;
|
||||
|
||||
Reference in New Issue
Block a user