Minor cleanup, add a speculative comment.

This commit is contained in:
Henrik Rydgård 2023-05-04 10:07:49 +02:00
parent c085990f21
commit 4e732af786
2 changed files with 6 additions and 4 deletions

View File

@ -444,10 +444,10 @@ public:
u32 Destroy(SceUID handle) {
u32 error;
if (Get<T>(handle, error)) {
occupied[handle-handleOffset] = false;
delete pool[handle-handleOffset];
// Why weren't we zeroing before?
pool[handle-handleOffset] = nullptr;
int index = handle - handleOffset;
occupied[index] = false;
delete pool[index];
pool[index] = nullptr;
}
return error;
};

View File

@ -54,6 +54,8 @@ namespace MIPSComp {
std::recursive_mutex jitLock;
void JitAt() {
// TODO: We could probably check for a bad pc here, and fire an exception. Could spare us from some crashes.
// Although, we just tried to load from this address to check for a JIT block, and if we're here, that succeeded..
jit->Compile(currentMIPS->pc);
}