win-capture: Hook Reset/ResetEx in Present* funcs

The virtual address table values for Reset/ResetEx can sometimes point
to functions that are in libraries outside of D3D8.dll and D3D9.dll, and
will cause a crash if used.  Instead, just hook Reset/ResetEx when one
of the Present* functions are called.
This commit is contained in:
jp9000
2015-11-20 09:32:44 -08:00
parent d1cbb2742e
commit 1755511b2f
8 changed files with 55 additions and 40 deletions

View File

@@ -76,7 +76,6 @@ void get_d3d8_offsets(struct d3d8_offsets *offsets)
if (success) {
offsets->present = vtable_offset(info.module, info.device, 15);
offsets->reset = vtable_offset(info.module, info.device, 14);
}
d3d8_free(info);