mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-05 04:05:27 +02:00
No need to manually decide pending or not for mipscalls.
This commit is contained in:
@@ -3125,10 +3125,10 @@ void __KernelChangeThreadState(Thread *thread, ThreadStatus newStatus) {
|
||||
|
||||
|
||||
static bool __CanExecuteCallbackNow(Thread *thread) {
|
||||
return g_inCbCount == 0;
|
||||
return currentCallbackThreadID == 0 && g_inCbCount == 0;
|
||||
}
|
||||
|
||||
void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, const u32 args[], int numargs, bool reschedAfter, SceUID cbId, bool forcePending = false)
|
||||
void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, const u32 args[], int numargs, bool reschedAfter, SceUID cbId)
|
||||
{
|
||||
if (!thread || thread->isStopped()) {
|
||||
WARN_LOG_REPORT(SCEKERNEL, "Running mipscall on dormant thread");
|
||||
@@ -3179,7 +3179,7 @@ void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, co
|
||||
u32 callId = mipsCalls.add(call);
|
||||
|
||||
bool called = false;
|
||||
if ((!thread || thread == __GetCurrentThread()) && !forcePending) {
|
||||
if ((!thread || thread == __GetCurrentThread())) {
|
||||
if (__CanExecuteCallbackNow(thread)) {
|
||||
thread = __GetCurrentThread();
|
||||
__KernelChangeThreadState(thread, THREADSTATUS_RUNNING);
|
||||
@@ -3197,9 +3197,9 @@ void __KernelCallAddress(Thread *thread, u32 entryPoint, Action *afterAction, co
|
||||
}
|
||||
}
|
||||
|
||||
void __KernelDirectMipsCall(u32 entryPoint, Action *afterAction, u32 args[], int numargs, bool reschedAfter, bool forcePending)
|
||||
void __KernelDirectMipsCall(u32 entryPoint, Action *afterAction, u32 args[], int numargs, bool reschedAfter)
|
||||
{
|
||||
__KernelCallAddress(__GetCurrentThread(), entryPoint, afterAction, args, numargs, reschedAfter, 0, forcePending);
|
||||
__KernelCallAddress(__GetCurrentThread(), entryPoint, afterAction, args, numargs, reschedAfter, 0);
|
||||
}
|
||||
|
||||
bool __KernelExecuteMipsCallOnCurrentThread(u32 callId, bool reschedAfter)
|
||||
|
||||
Reference in New Issue
Block a user