Add a static method for creating PSPPointers.
This is still kinda ugly, but the assignment thing was just too ugly, I couldn't do it anymore.
This commit is contained in:
parent
90b649c9fc
commit
183b4cb45c
12 changed files with 25 additions and 38 deletions
|
@ -1535,8 +1535,7 @@ u32 sceKernelReferThreadRunStatus(u32 threadID, u32 statusPtr)
|
|||
if (!Memory::IsValidAddress(statusPtr))
|
||||
return -1;
|
||||
|
||||
PSPPointer<SceKernelThreadRunStatus> runStatus;
|
||||
runStatus = statusPtr;
|
||||
auto runStatus = PSPPointer<SceKernelThreadRunStatus>::Create(statusPtr);
|
||||
|
||||
// TODO: Check size?
|
||||
runStatus->size = sizeof(SceKernelThreadRunStatus);
|
||||
|
@ -2575,8 +2574,7 @@ int sceKernelDelayThread(u32 usec)
|
|||
|
||||
int sceKernelDelaySysClockThreadCB(u32 sysclockAddr)
|
||||
{
|
||||
PSPPointer<SceKernelSysClock> sysclock;
|
||||
sysclock = sysclockAddr;
|
||||
auto sysclock = PSPPointer<SceKernelSysClock>::Create(sysclockAddr);
|
||||
if (!sysclock.IsValid()) {
|
||||
ERROR_LOG(SCEKERNEL, "sceKernelDelaySysClockThreadCB(%08x) - bad pointer", sysclockAddr);
|
||||
return -1;
|
||||
|
@ -2594,8 +2592,7 @@ int sceKernelDelaySysClockThreadCB(u32 sysclockAddr)
|
|||
|
||||
int sceKernelDelaySysClockThread(u32 sysclockAddr)
|
||||
{
|
||||
PSPPointer<SceKernelSysClock> sysclock;
|
||||
sysclock = sysclockAddr;
|
||||
auto sysclock = PSPPointer<SceKernelSysClock>::Create(sysclockAddr);
|
||||
if (!sysclock.IsValid()) {
|
||||
ERROR_LOG(SCEKERNEL, "sceKernelDelaySysClockThread(%08x) - bad pointer", sysclockAddr);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue