mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Core: Add argmask for threadhacks to prevent crash.
Every HLEFunction should have an argmask. Some asserts for shutdown crashes someone was seeing when calling HLE funcs from a shutdown function.
This commit is contained in:
parent
56a1b6d03a
commit
9cb74691b6
3 changed files with 10 additions and 8 deletions
|
@ -842,6 +842,7 @@ void hleDoLogInternal(LogTypes::LOG_TYPE t, LogTypes::LOG_LEVELS level, u64 res,
|
|||
const char *funcName = "?";
|
||||
u32 funcFlags = 0;
|
||||
if (latestSyscall) {
|
||||
_dbg_assert_(HLE, latestSyscall->argmask != nullptr);
|
||||
hleFormatLogArgs(formatted_args, sizeof(formatted_args), latestSyscall->argmask);
|
||||
|
||||
// This acts as an override (for error returns which are usually hex.)
|
||||
|
|
|
@ -89,14 +89,14 @@
|
|||
//sound
|
||||
//zlibdec
|
||||
const HLEFunction FakeSysCalls[] = {
|
||||
{NID_THREADRETURN, __KernelReturnFromThread, "__KernelReturnFromThread"},
|
||||
{NID_CALLBACKRETURN, __KernelReturnFromMipsCall, "__KernelReturnFromMipsCall"},
|
||||
{NID_INTERRUPTRETURN, __KernelReturnFromInterrupt, "__KernelReturnFromInterrupt"},
|
||||
{NID_EXTENDRETURN, __KernelReturnFromExtendStack, "__KernelReturnFromExtendStack"},
|
||||
{NID_MODULERETURN, __KernelReturnFromModuleFunc, "__KernelReturnFromModuleFunc"},
|
||||
{NID_IDLE, __KernelIdle, "_sceKernelIdle"},
|
||||
{NID_GPUREPLAY, __KernelGPUReplay, "__KernelGPUReplay"},
|
||||
{NID_HLECALLRETURN, HLEReturnFromMipsCall, "HLEReturnFromMipsCall"},
|
||||
{NID_THREADRETURN, __KernelReturnFromThread, "__KernelReturnFromThread", 'x', ""},
|
||||
{NID_CALLBACKRETURN, __KernelReturnFromMipsCall, "__KernelReturnFromMipsCall", 'x', ""},
|
||||
{NID_INTERRUPTRETURN, __KernelReturnFromInterrupt, "__KernelReturnFromInterrupt", 'x', ""},
|
||||
{NID_EXTENDRETURN, __KernelReturnFromExtendStack, "__KernelReturnFromExtendStack", 'x', ""},
|
||||
{NID_MODULERETURN, __KernelReturnFromModuleFunc, "__KernelReturnFromModuleFunc", 'x', ""},
|
||||
{NID_IDLE, __KernelIdle, "_sceKernelIdle", 'x', ""},
|
||||
{NID_GPUREPLAY, __KernelGPUReplay, "__KernelGPUReplay", 'x', ""},
|
||||
{NID_HLECALLRETURN, HLEReturnFromMipsCall, "HLEReturnFromMipsCall", 'x', ""},
|
||||
};
|
||||
|
||||
const HLEFunction UtilsForUser[] =
|
||||
|
|
|
@ -1514,6 +1514,7 @@ void __KernelWaitCurThread(WaitType type, SceUID waitID, u32 waitValue, u32 time
|
|||
}
|
||||
|
||||
PSPThread *thread = __GetCurrentThread();
|
||||
assert(thread != nullptr);
|
||||
thread->nt.waitID = waitID;
|
||||
thread->nt.waitType = type;
|
||||
__KernelChangeThreadState(thread, ThreadStatus(THREADSTATUS_WAIT | (thread->nt.status & THREADSTATUS_SUSPEND)));
|
||||
|
|
Loading…
Add table
Reference in a new issue