mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Start the kernel ids over on reset.
So that things aren't affected by wrapping over. Although, maybe we should handle that better if it causes incorrect behavior...
This commit is contained in:
1 parent
0185825b23
commit
d1d9fb5bbf
2 files changed
+6
-4
No files matched your search
@@ -424,7 +424,7 @@ u32 sceKernelIcacheClearAll()
|
||||
KernelObjectPool::KernelObjectPool()
|
||||
{
|
||||
memset(occupied, 0, sizeof(bool)*maxCount);
|
||||
nextID = 16;
|
||||
nextID = initialNextID;
|
||||
}
|
||||
|
||||
SceUID KernelObjectPool::Create(KernelObject *obj, int rangeBottom, int rangeTop)
|
||||
@@ -470,6 +470,7 @@ void KernelObjectPool::Clear()
|
||||
occupied[i]=false;
|
||||
}
|
||||
memset(pool, 0, sizeof(KernelObject*)*maxCount);
|
||||
nextID = initialNextID;
|
||||
}
|
||||
|
||||
KernelObject *&KernelObjectPool::operator [](SceUID handle)
|
||||
|
||||
@@ -427,7 +427,7 @@ public:
|
||||
~KernelObjectPool() {}
|
||||
|
||||
// Allocates a UID within the range and inserts the object into the map.
|
||||
SceUID Create(KernelObject *obj, int rangeBottom = 16, int rangeTop = 0x7fffffff);
|
||||
SceUID Create(KernelObject *obj, int rangeBottom = initialNextID, int rangeTop = 0x7fffffff);
|
||||
|
||||
void DoState(PointerWrap &p);
|
||||
static KernelObject *CreateByIDType(int type);
|
||||
@@ -520,8 +520,9 @@ public:
|
||||
|
||||
private:
|
||||
enum {
|
||||
maxCount=4096,
|
||||
handleOffset=0x100
|
||||
maxCount = 4096,
|
||||
handleOffset = 0x100,
|
||||
initialNextID = 0x10
|
||||
};
|
||||
KernelObject *pool[maxCount];
|
||||
bool occupied[maxCount];
|
||||
|
||||
Reference in new issue
Block a user