Check enqueue as well, should be safer.

Also, make sure not to eat a bunch more cycles when forcing a check.
This commit is contained in:
Unknown W. Brackets 2013-09-21 16:17:46 -07:00
parent 74f58ed357
commit d305d1faa2
2 changed files with 8 additions and 2 deletions

View File

@ -525,6 +525,8 @@ void ForceCheck()
globalTimer += cyclesExecuted;
// This will cause us to check for new events immediately.
currentMIPS->downcount = 0;
// But let's not eat a bunnch more time in Advance() because of this.
slicelength = 0;
}
void Advance()
@ -541,6 +543,7 @@ void Advance()
{
// WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000");
currentMIPS->downcount += 10000;
slicelength = 10000;
}
else
{

View File

@ -338,10 +338,11 @@ u32 sceGeListEnQueue(u32 listAddress, u32 stallAddress, int callbackId,
u32 listID = gpu->EnqueueList(listAddress, stallAddress, __GeSubIntrBase(callbackId), optParam, false);
if ((int)listID >= 0)
listID = 0x35000000 | listID;
listID = 0x35000000 ^ listID;
DEBUG_LOG(SCEGE, "List %i enqueued.", listID);
hleEatCycles(520);
hleEatCycles(490);
CoreTiming::ForceCheck();
return listID;
}
@ -359,6 +360,8 @@ u32 sceGeListEnQueueHead(u32 listAddress, u32 stallAddress, int callbackId,
listID = 0x35000000 ^ listID;
DEBUG_LOG(SCEGE, "List %i enqueued.", listID);
hleEatCycles(480);
CoreTiming::ForceCheck();
return listID;
}