mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Update current and limit bytes in vtimer refer.
This commit is contained in:
parent
ea507388ea
commit
002aed1080
1 changed files with 6 additions and 2 deletions
|
@ -473,8 +473,12 @@ u32 sceKernelReferVTimerStatus(u32 uid, u32 statusAddr) {
|
|||
return error;
|
||||
}
|
||||
|
||||
if (Memory::IsValidAddress(statusAddr))
|
||||
Memory::WriteStruct(statusAddr, &vt->nvt);
|
||||
if (Memory::IsValidAddress(statusAddr)) {
|
||||
NativeVTimer status = vt->nvt;
|
||||
u32 size = Memory::Read_U32(statusAddr);
|
||||
status.current = __getVTimerCurrentTime(vt);
|
||||
Memory::Memcpy(statusAddr, &status, std::min(size, (u32)sizeof(status)));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue