diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pprint.c | 8 | ||||
-rw-r--r-- | src/wrap.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/pprint.c b/src/pprint.c index 8043ddc..d64b138 100644 --- a/src/pprint.c +++ b/src/pprint.c @@ -472,10 +472,10 @@ static void pprint_PVRSRV_BRIDGE_OUT_MHANDLE_TO_MMAP_DATA(FILE *fp, PVRSRV_BRIDG ".uiUserVAddr = 0x%x\n" "}\n", PPRINT(fp, out->eError, PVRSRV_ERROR), - out->uiMMapOffset, - out->uiByteOffset, - out->uiRealByteSize, - out->uiUserVAddr); + (uint32_t)out->uiMMapOffset, + (uint32_t)out->uiByteOffset, + (uint32_t)out->uiRealByteSize, + (uint32_t)out->uiUserVAddr); } static void pprint_PVRSRV_BRIDGE_IN_MHANDLE_TO_MMAP_DATA(FILE *fp, PVRSRV_BRIDGE_IN_MHANDLE_TO_MMAP_DATA *out) { @@ -210,7 +210,7 @@ static void clear_mem(struct mem_entry *mem) { || heap == PVR_HEAP_PDS_VERTEX_CODE_DATA || heap == PVR_HEAP_PDS_PIXEL_CODE_DATA || heap == PVR_HEAP_GENERAL - //|| heap == PVR_HEAP_KERNEL_DATA + || heap == PVR_HEAP_KERNEL_DATA || heap == PVR_HEAP_PERCONTEXT_3DPARAMETERS || heap == PVR_HEAP_SYNC_INFO || heap == PVR_HEAP_TA_DATA; @@ -250,7 +250,7 @@ static struct mem_entry *add_mmap_pointer(void* data, int prot, size_t length, u for (int j = 0; j < 2; j++) { if (mem->in_use && mem->has_mmap[j]) { if (mem->mmap_data[j].uiMMapOffset == pgoffset && mem->mmap_data[j].uiRealByteSize == length) { - mem->data[j] = data; + mem->data[j] = data + mem->mmap_data[j].uiByteOffset; mem->prot[j] = prot; return mem; } @@ -1103,7 +1103,7 @@ long syscall(long number, ...) { va_end(args); long ret = orig_syscall(number, addr, length, prot, flags, fd, pgoffset); if (is_pvr(fd)) { - printf("mmap2 called with 0x%lx 0x%x 0x%x %x\n", ret, flags, addr, pgoffset); + printf("mmap2 called with 0x%lx 0x%lx 0x%lx %lx\n", ret, flags, addr, pgoffset); last_mem_entry = add_mmap_pointer((void*)ret, prot, length, pgoffset); clear_mem(last_mem_entry); } |