mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-15 23:40:29 +02:00
Warning fixes, prevent a possible (but unlikely) crash
This commit is contained in:
1 parent
41ea4ff358
commit
972e4ea4e4
4 files changed
+14
-8
No files matched your search
@@ -361,7 +361,7 @@ u32 sceCtrlSetSamplingMode(u32 mode)
|
||||
int sceCtrlGetSamplingMode(u32 modePtr)
|
||||
{
|
||||
u32 retVal = analogEnabled == true ? CTRL_MODE_ANALOG : CTRL_MODE_DIGITAL;
|
||||
DEBUG_LOG(HLE, "%d=sceCtrlGetSamplingMode(%i)", retVal);
|
||||
DEBUG_LOG(HLE, "%d=sceCtrlGetSamplingMode(%08x)", retVal, modePtr);
|
||||
|
||||
if (Memory::IsValidAddress(modePtr))
|
||||
Memory::Write_U32(retVal, modePtr);
|
||||
|
||||
@@ -71,10 +71,10 @@ struct PendingInterrupt {
|
||||
PendingInterrupt(int intr_, int subintr_, int arg_)
|
||||
: intr(intr_), subintr(subintr_), hasArg(true), arg(arg_) {}
|
||||
|
||||
int arg;
|
||||
bool hasArg;
|
||||
int intr;
|
||||
int subintr;
|
||||
bool hasArg;
|
||||
int arg;
|
||||
};
|
||||
|
||||
class SubIntrHandler
|
||||
|
||||
@@ -1140,9 +1140,15 @@ void sceKernelCheckThreadStack()
|
||||
{
|
||||
u32 error;
|
||||
Thread *t = kernelObjects.Get<Thread>(__KernelGetCurThread(), error);
|
||||
u32 diff = abs((long)((s64)t->stackBlock - (s64)currentMIPS->r[MIPS_REG_SP]));
|
||||
ERROR_LOG(HLE, "%i=sceKernelCheckThreadStack()", diff);
|
||||
RETURN(diff); //Blatant lie
|
||||
if (t) {
|
||||
u32 diff = abs((long)((s64)t->stackBlock - (s64)currentMIPS->r[MIPS_REG_SP]));
|
||||
WARN_LOG(HLE, "%i=sceKernelCheckThreadStack()", diff);
|
||||
RETURN(diff);
|
||||
} else {
|
||||
// WTF?
|
||||
ERROR_LOG(HLE, "sceKernelCheckThreadStack() - not on thread");
|
||||
RETURN(-1);
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadContext::reset()
|
||||
|
||||
+2
-2
@@ -9,8 +9,8 @@ public:
|
||||
dlIdGenerator(1),
|
||||
currentList(NULL),
|
||||
stackptr(0),
|
||||
dumpThisFrame_(false),
|
||||
dumpNextFrame_(false)
|
||||
dumpNextFrame_(false),
|
||||
dumpThisFrame_(false)
|
||||
{}
|
||||
|
||||
virtual void PreExecuteOp(u32 op, u32 diff);
|
||||
|
||||
Reference in new issue
Block a user