mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #2706 from mattweb28/ioctl-fix
fix ioctl cmd=0x01020004
This commit is contained in:
commit
10184d2e73
1 changed files with 7 additions and 4 deletions
|
@ -1607,11 +1607,14 @@ int __IoIoctl(u32 id, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 out
|
|||
}
|
||||
break;
|
||||
|
||||
// Get UMD file pointer
|
||||
// Get UMD file offset
|
||||
case 0x01020004:
|
||||
INFO_LOG(HLE, "sceIoIoCtl: Asked for fpointer of file %i", id);
|
||||
if (Memory::IsValidAddress(outdataPtr) && outlen >= 4) {
|
||||
Memory::Write_U32(f->info.fpointer, outdataPtr);
|
||||
{
|
||||
s32 offset = pspFileSystem.GetSeekPos(f->handle);
|
||||
INFO_LOG(HLE, "sceIoIoCtl: Asked for file offset of file %i", id);
|
||||
if (Memory::IsValidAddress(outdataPtr) && outlen >= 4) {
|
||||
Memory::Write_U32(offset, outdataPtr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue