Adapt everything in BT5 to new capnhook API

This includes:
- Renaming of functions (iohook_invoke_next)
- Slight interface changes (com_proxy_wrap, iohook_push_handler)
- De-duplicate stuff from utils (iobuf, hr)
This commit is contained in:
icex2
2020-09-02 19:35:15 +00:00
parent b777396efd
commit 5de9fdee43
52 changed files with 265 additions and 333 deletions
+14 -2
View File
@@ -517,6 +517,7 @@ static HRESULT hook_d3d9_irp_handler_real_ctx_create(struct hook_d3d9_irp *irp)
IDirect3D9 *api;
IDirect3D9Vtbl *api_vtbl;
struct com_proxy *api_proxy;
HRESULT res;
log_assert(irp);
@@ -526,7 +527,12 @@ static HRESULT hook_d3d9_irp_handler_real_ctx_create(struct hook_d3d9_irp *irp)
return E_FAIL;
}
api_proxy = com_proxy_wrap(api, sizeof(*api->lpVtbl));
res = com_proxy_wrap(&api_proxy, api, sizeof(*api->lpVtbl));
if (res != S_OK) {
log_fatal("Wrapping com proxy failed: %08lx", res);
}
api_vtbl = api_proxy->vptr;
real_CreateDevice = api_vtbl->CreateDevice;
@@ -624,7 +630,13 @@ hook_d3d9_irp_handler_real_dev_create_device(struct hook_d3d9_irp *irp)
}
api = *irp->args.ctx_create_device.pdev;
api_proxy = com_proxy_wrap(api, sizeof(*api->lpVtbl));
hr = com_proxy_wrap(&api_proxy, api, sizeof(*api->lpVtbl));
if (hr != S_OK) {
log_warning("Wrapping com proxy failed: %08lx", hr);
return hr;
}
api_vtbl = api_proxy->vptr;
real_CreateTexture = api_vtbl->CreateTexture;