Callbacks: Fix delete when multiple for a thread.

Oops, this was deleting all after the deleted one.
This commit is contained in:
Unknown W. Brackets 2016-05-28 21:15:25 -07:00
parent 0d6ad3df2f
commit 04576189b4

View File

@ -2716,7 +2716,7 @@ int sceKernelDeleteCallback(SceUID cbId)
{
Thread *thread = kernelObjects.Get<Thread>(cb->nc.threadId, error);
if (thread)
thread->callbacks.erase(std::find(thread->callbacks.begin(), thread->callbacks.end(), cbId), thread->callbacks.end());
thread->callbacks.erase(std::remove(thread->callbacks.begin(), thread->callbacks.end(), cbId), thread->callbacks.end());
if (cb->nc.notifyCount != 0)
readyCallbacksCount--;