Improve perf of sceKernelCheckCallback().
Some games seem to call this a lot.
This commit is contained in:
parent
b77d965e56
commit
f9fc1af5c8
1 changed files with 8 additions and 0 deletions
|
@ -2696,6 +2696,14 @@ bool __KernelCheckCallbacks() {
|
|||
|
||||
bool __KernelForceCallbacks()
|
||||
{
|
||||
// Let's not check every thread all the time, callbacks are fairly uncommon.
|
||||
if (readyCallbacksCount == 0) {
|
||||
return false;
|
||||
}
|
||||
if (readyCallbacksCount < 0) {
|
||||
ERROR_LOG(HLE, "readyCallbacksCount became negative: %i", readyCallbacksCount);
|
||||
}
|
||||
|
||||
Thread *curThread = __GetCurrentThread();
|
||||
|
||||
bool callbacksProcessed = __KernelCheckThreadCallbacks(curThread, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue