mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 19:58:36 +01:00
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:
1 parent
90b649c9fc
commit
183b4cb45c
12 files changed
+25
-38
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user